background preloader

VI and VIM editor: Tutorial and advanced features

VI and VIM editor: Tutorial and advanced features
Vim Intro: This "vi" tutorial is intended for those who wish to master and advance their skills beyond the basic features of the basic editor. It covers buffers, "vi" command line instructions, interfacing with UNIX commands, and ctags. The advantage of learning vi and learning it well is that one will find vi on all Unix based systems and it does not consume an inordinate amount of system resources. NOTE: Microsoft PC Notepad users who do not wish to use "vi" should use "gedit" (GNOME edit) or "gnp" (GNOME Note Pad) on Linux. See our list of Linux GUI editors Vim Installation: Red Hat / CentOS / Fedora: rpm -ivh vim-common-...rpm vim-minimal-...rpm vim-enhanced-...rpm vim-X11-...rpm yum install vim-common vim-minimal vim-enhanced vim-X11 Ubuntu / Debian: apt-get install vim vim-common vim-gnome vim-gui-common vim-runtime Compiling Vim from source: Download vim source from tar xzf vim-7.0.tar.gz cd vim70 . Vi/Vim Command Line Arguments: Basic "vi" features: Editing Commands: Related:  ADMIN. SYS.

Might - Kingdoms of Camelot Wiki - Knights, Buildings, Troops, Battle, Resources, and more! Might is a combined number of points for troops, buildings, Throne Room Cards, and Champion Cards, each of which give a certain amount of Might. In the case of the Cards you get more might with each Enhancement and Upgrade on a Card. Increasing your Might allows you to gain levels and improve your Title. Your Might is reduced when you lose battles as an attacker due to troop or wall losses. You can replace your lost Might by replacing the units and buildings lost in battle. To calculate total Might for one building use the following formula: (2^(Building Level-1)) x Base Might So if you have a level 9 Alchemy Lab with a base might of 30: (2^8)x30= 7680 Troops If you want to get the most Might for your ongoing Food cost, build Supply Wagons. As of August, 2012 the building times and might for buildings was revised by Kabam. Buildings A full city having all buildings and all fields, all to level 9, will thus give you 385805 might. Defensive Units Might per Minute Racing to get your might up?

Etape 1 : La création des certificats Connectez-vous sous root et allez dans le répertoire de configuration de votre serveur Apache2 /etc/apache2 (on peut évidemment choisir un autre répertoire) et créez un répertoire appelé ssl. Vous vous placerez dans ce répertoire afin que les clés et les certificats soient créés à l'intérieur avant d'effectuer les manipulations. Création du certificat serveur Génération de la clé privée On génère la clef privée avec la commande suivante en définissant un nom de fichier : openssl genrsa 1024 > servwiki.key La sortie attendue est la suivante : Generating RSA private key, 1024 bit long modulus ..................++++++ .................................................................++++++ e is 65537 (0x10001) Si vous souhaitez que cette clé ait un mot de passe (qui vous sera demandé à chaque démarrage d'apache, donc à éviter !) Ceci a pour effet de créer une clé SSL (fichier servwiki.key), ne la perdez pas... c'est votre clé privée... Vous pouvez observer son contenu : less servwiki.key

Fucking. Awesome. - Imgur albums browse your computer drag and drop here Ctrl + V paste from your clipboard By uploading, you agree to our terms of service That file type is not supported! Supported formats: JPEG, GIF, PNG, APNG, TIFF, BMP, PDF, XCF Imgur is home to the web's most popular image content, curated in real time by a dedicated community through commenting, voting and sharing. View full resolution Download full resolution View full resolution Download full resolution View full resolution Download full resolution View full resolution Download full resolution View full resolution Download full resolution View full resolution Download full resolution View full resolution Download full resolution View full resolution Download full resolution View full resolution Download full resolution View full resolution Download full resolution View full resolution Download full resolution View full resolution Download full resolution View full resolution Download full resolution © 2014 Imgur, LLC. we're hiring! Album: 13 images Fucking. No way! I'm sure

materiel:connaitre_son_materiel Prérequis Il faut tout d'abord vérifier la présence des paquetage suivants : pciutils usbutils Smartmontools Pour avoir toutes les informations utiles sur sa carte mère et quelques informations diverses sur votre matériel. Utilisez la commande en root ( su ou en mode sudo ): dmidecode et vous obtiendrez ceci (bref exemple ): Handle 0x0001, DMI type 1, 27 bytes System Information Manufacturer: System manufacturer Product Name: P5Q DELUXE Version: System Version Serial Number: System Serial Number UUID: A041001E-8C00-01...etc ..... Handle 0x0002, DMI type 2, 15 bytes Base Board Information Manufacturer: ASUSTeK Computer INC. une autre méthode pour connaitre sa version de bios est en mode ROOT : dd if=/dev/mem bs=32k skip=31 count=1 | strings -n 8 | grep -i bios et vous obtiendrez donc : AMIBIOS 080012 1+0 enregistrements lus 1+0 enregistrements écrits 32768 octets (33 kB) copiésAMIBIOS(C)2006 American Megatrends, Inc. En console: Type de processeur pour lequel est compilé le noyau : $ uname -p top

Change font size quickly If you regularly switch to a larger or smaller font, for example because someone looking at your code thinks the letters are too small, or because you want to lay back in your chair while reading, this tip is for you. The following script defines two commands, :LargerFont and :SmallerFont, to allow quick adjustments to the font size used in the gtk2 gui. Change minfontsize and maxfontsize to suit your needs. See below for alternative solutions. To use this script, put the following code into ~/.vim/plugin/gtk2fontsize.vim or in your vimrc. let s:pattern = '^\(.* \)\([1-9][0-9]*\)$' let s:minfontsize = 6 let s:maxfontsize = 16 function! Related plugins Edit As an alternative, you could use one of these plugins which work with fonts on Unix and Windows systems: Mapping solution Another alternative is to use the following mappings which use a clever substitute (no functions are required). nnoremap <C-Up> :silent! Explanation Edit The replacement string \=eval(submatch(0)+1) uses: submatch(0) eval()

Fix "502 Bad Gateway" error on NGINX server after upgrading PHP • JvdC.me I check my servers for upgrades on a regular basis and when I noticed yesterday that PHP was upgraded to version 5.5.12, I backed up everything of course (backup guide) and decided to upgrade which can easily be done with sudo apt-get dist-upgrade. Unfortunately I’ve ran into quite an annoying issue which I had not encountered before, all pages returned “502 Bad Gateway” errors. I’ve done this a numerous time and the upgrade went very smoothly. I was even asked if I wanted to keep local configuration files or not. What does this error message mean? Problem Solving 1: is PHP-FPM running? As you can see I am also running the latest version of NGINX (1.6.0 as of May 10th 2014) which was updated a few days earlier. ps aux will output all processes that are running, so we add | grep php to only output processes with php in the name. If there are still no PHP-FPM processes running, you might try to remove PHP and reinstall it. Problem Solving 2a: is PHP-FPM listening correctly? Conclusion

List of the keyboard shortcuts that are available in Windows XP This article describes the keyboard shortcuts that you can use to complete tasks in Windows XP. General keyboard shortcuts Click here to show/hide list Dialog box keyboard shortcuts Click here to show/hide list If you press Shift+F8 in extended selection list boxes, you enable extended selection mode. Ctrl+Tab (Move forward through the tabs)Ctrl+Shift+Tab (Move backward through the tabs)Tab (Move forward through the options)Shift+Tab (Move backward through the options)Alt+Underlined letter (Perform the corresponding command, or select the corresponding option)Enter (Perform the command for the active option or button)Spacebar (Select or clear the check box if the active option is a check box)Arrow keys (Select a button if the active option is a group of option buttons)F1 key (Display Help)F4 key (Display the items in the active list)Backspace (Open a folder one level up if a folder is selected in the Save As or Open dialog box) Microsoft natural keyboard shortcuts Click here to show/hide list

ssh Cette page présente les usages les plus courants de SSH et sa configuration de base. Voir sur SSH Avancé pour les autres usages. SSH est un protocole permettant d'établir une communication chiffrée, donc sécurisée (on parle parfois de tunnel), sur un réseau informatique (intranet ou Internet) entre une machine locale (le client) et une machine distante (le serveur). La sécurité du chiffrement peut être assurée par différentes méthodes, entre autre par mot de passe ou par un système de clés publique / privée (mieux sécurisé, on parle alors de cryptographie asymétrique). SSH remplace de manière sécurisée : Telnet : vous pouvez exécuter des commandes depuis un réseau local ou Internet via SSHFTP : si vous ne souhaitez qu'ajouter ou modifier des fichiers sur un serveur, SFTP est bien plus adapté que FTP Et d'autres, via le « tunneling » : on peut accéder à un service réseau en le faisant circuler dans un tunnel SSH pour profiter de toutes les protections qu'il apporte. ssh -V dpkg -l libssl*

Code - Vim color schemes how-to First, pick up a colour scheme for Vim, for instance from Inspiration - Color Theme Generator by clicking "Vim Scheme". Let us say you downloaded the file inspiration682066.vim . Now place inspiration682066.vim in ~/.vim/colors . If the folder doesn't exist, create it. For quick testing you can run the following lines: cd ~ mkdir - p . vim / colors wget -- directory - prefix =. vim / colors http : // inspiration . sweyla . com / code / vim / inspiration682066 . vim Now add the following to your ~/.vimrc (if you don't have one, create it). colorscheme inspiration682066 sy on Start Vim and enjoy your new colour scheme. It doesn't look good? Linux The new Vim Scheme export function supports both full RGB and 256 terminal colours. More information on 256 colour xterm here . Mac OS X The easiest way of getting full colours on Mac OS X is to download MacVim , which will work out of the box. Personally, I use iTerm which supports 256 colour xterm, which works great.

Cours Linux : Les permissions Cet article a été publié par Benjamin le 09-02-09 à 10:13 dans la catégorie Cours Linux Tags : - Cours - Libre - Ubuntu Tout linuxien sait ce que sont les permissions dans un système Unix. En revanche, tous ne savent pas forcément comment modifier ces droits, et surtout, comment bien les modifier. Dans ce cours, nous allons étudier les différents privilèges d'un système Unix, comment modifier les droits d'un fichier de manière optimale et les risques encourus en cas de mauvaise gestion de ces droits. I. La philosophie d'un système Unix est la suivante : tout est fichier. Pour voir les différents droit des fichiers, exécutons la commande ls -l dans un terminal : -rw-r--r-- 1 benj benj 670567 2009-02-01 22:32 Freedom.tar.gzdrwxr-xr-x 5 benj benj 4096 2009-02-04 22:30 Romsdrwx------ 2 benj benj 4096 2009-02-05 18:40 rubylrwxrwxrwx 1 benj benj 9 2009-02-07 14:26 www -> /var/www/ Nous allons, pour le moment, nous intéresser aux lettres situées à gauche : (drwxr-xr-x) II. La manière "relative"

Configurer un serveur DNS avec Bind9 sur Debian Squeeze | Le webadonf.net déblogue! Qu’est-ce que le DNS?Cet acronyme signifie en anglais Domain Name System ou en français système de noms de domaines. C’est un service qui fait correspondre une adresse IP à un nom de domaine afin de pouvoir l’identifier et le mémoriser plus facilement. Par exemple, le nom de domaine www.webadonf.net est plus simple à mémoriser pour les humains que l’adresse IP 81.67.245.192 dont les machines raffolent. Sous Linux, Bind est le service qui permet de gérer le DNS. Pré requis : Debian Lenny ou Squeeze installé. Nous allons créer un serveur DNS nommé « vtdebian03 » sur le domaine « webadonf.lan » en IP privées de classe A. Voici les fichiers importants de configuration pour Bind9. Ou bien dans le dossier « /etc » : Dans « /etc/hostname », complétez le nom de votre serveur avec son nom FQDN (Fully Qualified Domain Name) afin que le service DNS puisse fonctionner correctement par la suite: Puis démarrez le service : Dans « /etc/host.conf », insérez les paramètres suivants : -● : Le Point.

Partage de fichiers avec Samba Pour partager ses fichiers, il faut tout d’abord installer samba. Utilisateur de la Debian, la commande est la suivante : #apt-get install samba Une fois installé, la Debian va proposer la configuration de samba. Un premier écran s’affiche pour donner des informations sur ce programme. Il faut passer cet écran en validant OK. Samba est maintenant installé, configuré et lancé. [1] L’étape suivante consiste à configurer le partage des fichiers. #mv /etc/samba/smb.conf /etc/samba/smb.conf.old Puis il faut créer un nouveau fichier /etc/samba/smb.conf contenant ces informations : [global] server string = Vampire workgroup = Workgroup netbios name = Vampire public = yes encrypt passwords = true[projects] path = /home/zero/projects read only = no writeable = yes valid users = zero comment = all_my_projects Ce fichier se décompose en deux parties : La section générale appelée : global Et la section de partage qui dans l’exemple s’appelle : projects path : indique le répertoire à partager. Client Samba

Attribuer une IP fixe à Debian Squeeze | Le webadonf.net déblogue! Pourquoi une IP fixe à mon serveur?Si une machine cliente ne dispose pas forcément d’une IP fixe, ça n’est pas grave car le DHCP lui en distribuera une. Par contre si le serveur est en dynamique et non en adressage statique, il changera d’adresse sans arrêt et les clients ne seront plus où il est et n’accèderont plus à ses services. Concrêtement c’est comme si la Poste ou votre magasin préféré déménageait tout le temps. Pré requis : Debian Squeeze installé. Ouvrez le fichier dans votre session root : Modifiez en conséquence votre fichier pour passer en adressage statique selon vos paramètres réseau par exemple : Ouvrez le fichier conf pour le DNS : Modifiez-le en renseignant les serveurs DNS soit de votre serveur DNS (souvent installé comme service DNS sur votre BOX) ou bien de votre FAI (et même parfois avec ceux de google comme ici en deuxième ligne): On redémarre le service : Et voilà, vous avez une adresse IP fixe pour votre serveur.

fish shell

Related: