Intro to Unix and Vim star wars: telnet towel.blinkenlights.nl
Who am I
- 4th year comp sci, cmd line noob
Why command line
- highly productive
- O(1) vs long time for mouse
- Sometimes the only way to get something done. (SysAdmin and deployment.)
| .pos 0x100 | |
| main: irmovl bottom, %esp # initialize stack | |
| irmovl a, %edi # address of the first element of a | |
| irmovl alen, %esi | |
| mrmovl (%esi), %esi # number of elements of a | |
| irmovl $0x1, %eax | |
| subl %eax, %esi # last index in a | |
| # ready to call findmax: a --> edi, last --> esi | |
| call findmax |
| #include <xeroskernel.h> | |
| /* | |
| * Runs in user space, executing handler then | |
| * returning to previous stack of the process | |
| */ | |
| void sigtramp(void (*handler)(void *), void *ctx_frame, unsigned int old_esp) { | |
| handler(ctx_frame); | |
| syssigreturn(old_esp); | |
| } |
| brendan greg's incredibleness: http://www.brendangregg.com/Perf/linux_observability_tools.png | |
| vim practice: wget https://raw.githubusercontent.com/jtgi/algs-ds/1e4f2b066f0b0f102a35e8573d9a12b1f0c19e0b/Trees/Bst.java |
| import java.util.*; | |
| /* | |
| * NORMAL MODE | |
| * challenge 0: motions | |
| * hjkl - move in all directions | |
| * www - move to next word | |
| * bbb - move to prev word, | |
| * eee - move to next word, | |
| * $ - move to end of line |
| import java.util.*; | |
| /* | |
| * NORMAL MODE | |
| * challenge 0: motions | |
| * hjkl - move in all directions | |
| * www - move to next word | |
| * bbb - move to prev word, | |
| * eee - move to next word, | |
| * $ - move to end of line |
| set shell=bash | |
| set t_Co=256 | |
| syntax on | |
| filetype on | |
| filetype indent on | |
| map ; : | |
| map <C-h> <C-w>h | |
| map <C-j> <C-w>j |
Intro to Unix and Vim star wars: telnet towel.blinkenlights.nl
Who am I
Why command line
| wow | |
| Coding at the command line with Vim! | |
| ==================================== | |
| # Why Vim? | |
| - Runs everywhere (your server), bindings in all your IDEs. | |
| - Very effective for most dynamic / scripting languages and others | |
| that operate closely on the command line. | |
| - The genius of modal editing. Normal vs Insert vs Visual vs Visual Blocks |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #include <stdarg.h> | |
| #include <arpa/inet.h> | |
| #include "mpi.h" | |
| #include "fgmpi.h" |
| <Response> | |
| <Say voice="alice" language="es-ES">Su numero PIN de firma electronica es: 3 7 9 4 1 2</Say> | |
| </Response> |