Create un archivo llamado .vimrc en tu home
cat >> ~/.vimrc
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set smarttab
set smartindent
set number
syntax on
Apreta CTRL+D
Cuando quieras pegar en un archivo abierto con el vim y se ves que la indentacion sale mal proba con esto
vim file.x
:set paste
"Pega la informacion que queres "
:set nopaste
:wq
Si queres ver en mas detalle fijate en vim options
Con el paso del tiempo, el cambio y la cantidad de información asociada se hace una tarea sumamente laboriosa el encontrar las soluciones..., en un formato simple.
Sep 20, 2010
Sep 15, 2010
Para Compartir En forma Rapida Con Python
La forma mas facil y rapida de compartir y/o exponer un directorio por medio de http es usando python
Te vas al directorio que queres compartir, en este caso tmp:
cd tmp
Ejecutas algo tan simple como:
python -m SimpleHTTPServer 8000 &
Automaticamente te levanta un servidor http en el puerto 8000.
Ahora podes usar wget o cualquier client http para extraer la informacion
Para mas detalles fijate aca Python Doc HTTP server
Te vas al directorio que queres compartir, en este caso tmp:
cd tmp
Ejecutas algo tan simple como:
python -m SimpleHTTPServer 8000 &
Automaticamente te levanta un servidor http en el puerto 8000.
Ahora podes usar wget o cualquier client http para extraer la informacion
Para mas detalles fijate aca Python Doc HTTP server
El chat de Facebook in Jabber!
Si queres conectar tu cliente jabber con el servidor de chat de facebook solamente tenes que configurar los siguiente.
username = user@chat.facebook.com
password = your password
server = chat.facebook.com
port = 5222
Lo demas los dejas por default (sin ssl)
Para ver mas fijate aca Facebook Chat
username = user@chat.facebook.com
password = your password
server = chat.facebook.com
port = 5222
Lo demas los dejas por default (sin ssl)
Para ver mas fijate aca Facebook Chat
Configuraciones de alias de linux
Los siguientes alias me llegaron por medio una lista de distribución de linux, y me parece muy copados para compartir
#### alias stuff
## Note: to include a single-quote in the body of a csh or tcsh alias, use the 4 characters: '\''
alias aliases 'vim ~/.aliases && echo "\n Sourcing aliases... \n" && source ~/.aliases'
alias alias-list 'cat ~/.aliases | grep alias | grep -v ^#'
#### host info
alias host-info 'ls /etc/*release | xargs head -1 /.image'
alias cpu-info-set 'set tcpu_allcores=(`grep "core id" /proc/cpuinfo | wc -l`); setenv cpu_allcores $tcpu_allcores; set tcpu_count=(`grep "core id" /proc/cpuinfo | grep 0 | wc -l`); setenv cpu_count $tcpu_count; @ tcpu_cores
= $cpu_allcores / $cpu_count; setenv cpu_cores $tcpu_cores; set tcpu_model=(`grep "model name" /proc/cpuinfo | head -n1 | cut -d: -f2 | tr -s " " | sed -e "s/(R)//g" -e "s/^ //" -e "s/ /-/g"`); setenv cpu_model "$tcpu_model"'
alias cpu-info 'cpu-info-set && echo "total cores = "$cpu_allcores;
echo "cores per proc = "$cpu_cores; echo "processors = "$cpu_count;
echo "processor model = "$cpu_model'
alias cpu-info-short 'cpu-info-set && echo "total="$cpu_allcores"
proc_cores="$cpu_cores" procs="$cpu_count" model="$cpu_model'
alias cpu-info-2short 'cpu-info-set && echo $cpu_allcores" "$cpu_cores" "$cpu_count" "$cpu_model'
#### grep stuff
alias gvg 'grep -v grep'
#### ssh stuff
alias sshpkill 'ssh \!* "ps -elf | head -1 && ps -elf | grep $USER | grep -v grep | grep -v ps && echo && echo "^^^^ processes running on host that will be killed ^^^^ " && echo && pkill -15 -u $USER " && (echo "ran SIGTERM, sleeping 20 seconds then running SIGKILL...\n"; sleep 20; ssh \!* "pkill -9 -u $USER") || echo "\nNo processes by $USER were running on that host!"'
#### ps stuff
alias psu 'ps -U \!* -u \!* u'
alias psc 'ps -eo
bsdtime:10,etime:13,pid:10,euser:10,%cpu:5,%mem:5,comm:20,command --no-header'
alias psc-head 'ps -eo bsdtime:10,etime:13,pid:10,euser:10,%cpu:5,%mem:5,comm:20,command | head -1'
alias ps-eda '(psc | grep -i "\/eda\/" | sort -n && psc-head)'
alias ps-eda-clean '(psc | grep -i "\/eda\/" | sort -n | cut -c -66 && psc-head)'
alias ps-users '(psc | grep -v -E " root | nobody | daemon | messagebus | nmetrics | intelmta |sbin/|sort -n" | sort -n && psc-head)'
alias ps-proc '(ps -p \!* -o bsdtime:10,pid:10,euser:10,%cpu:5,%mem:5,comm:20,command && psc-head)'
alias ps-grep '(psc | grep -i \!* | gvg | sort -n && psc-head)'
alias ps-grep-clean '(psc | grep -i \!* | sort -n | cut -c -66 && psc-head)'
#### package / rpm stuff
alias rpm-find-file 'rpm -qf \!*'
#### build stuff
alias ld-path 'ld --verbose | grep SEARCH | tr " " "\n" | cut -d\" -f2'
alias dlinker-path 'readelf -l /bin/echo | grep interpreter | cut -d: -f2 | cut -d" " -f2 | cut -d] -f1 | xargs ls -l'
#### fun stuff
alias rot13 tr \'a-zA-Z\' \'n-za-mN-ZA-M\'
#### vnc stuff
alias vncserv 'vncserver -geom 1600x1200 -randr 1580x1170,1600x1200,1920x1200,2560x1600'
#### cdislookup stuff
alias cvg '/usr/intel/bin/cdislookup -w "\!*"'
alias cvi '/usr/intel/bin/cdislookup -i "\!*"'
#### ls stuff
alias ls 'ls --color=auto'
alias lt 'ls -lart'
alias ll 'ls -al'
alias lld 'll -d */ .*/'
alias newest-file 'ls -1atr "\!*" | tail -n1'
alias newest-file-ls 'ls -altr "\!*" | tail -n1'
#### du / df stuff
alias dush 'du -smc * | sort -n | tail'
#### printer stuff
alias print-me 'genscript -v -G -j -r -U 2'
#### screen stuff
alias screen-reattach 'screen -raAd'
#### alias stuff
## Note: to include a single-quote in the body of a csh or tcsh alias, use the 4 characters: '\''
alias aliases 'vim ~/.aliases && echo "\n Sourcing aliases... \n" && source ~/.aliases'
alias alias-list 'cat ~/.aliases | grep alias | grep -v ^#'
#### host info
alias host-info 'ls /etc/*release | xargs head -1 /.image'
alias cpu-info-set 'set tcpu_allcores=(`grep "core id" /proc/cpuinfo | wc -l`); setenv cpu_allcores $tcpu_allcores; set tcpu_count=(`grep "core id" /proc/cpuinfo | grep 0 | wc -l`); setenv cpu_count $tcpu_count; @ tcpu_cores
= $cpu_allcores / $cpu_count; setenv cpu_cores $tcpu_cores; set tcpu_model=(`grep "model name" /proc/cpuinfo | head -n1 | cut -d: -f2 | tr -s " " | sed -e "s/(R)//g" -e "s/^ //" -e "s/ /-/g"`); setenv cpu_model "$tcpu_model"'
alias cpu-info 'cpu-info-set && echo "total cores = "$cpu_allcores;
echo "cores per proc = "$cpu_cores; echo "processors = "$cpu_count;
echo "processor model = "$cpu_model'
alias cpu-info-short 'cpu-info-set && echo "total="$cpu_allcores"
proc_cores="$cpu_cores" procs="$cpu_count" model="$cpu_model'
alias cpu-info-2short 'cpu-info-set && echo $cpu_allcores" "$cpu_cores" "$cpu_count" "$cpu_model'
#### grep stuff
alias gvg 'grep -v grep'
#### ssh stuff
alias sshpkill 'ssh \!* "ps -elf | head -1 && ps -elf | grep $USER | grep -v grep | grep -v ps && echo && echo "^^^^ processes running on host that will be killed ^^^^ " && echo && pkill -15 -u $USER " && (echo "ran SIGTERM, sleeping 20 seconds then running SIGKILL...\n"; sleep 20; ssh \!* "pkill -9 -u $USER") || echo "\nNo processes by $USER were running on that host!"'
#### ps stuff
alias psu 'ps -U \!* -u \!* u'
alias psc 'ps -eo
bsdtime:10,etime:13,pid:10,euser:10,%cpu:5,%mem:5,comm:20,command --no-header'
alias psc-head 'ps -eo bsdtime:10,etime:13,pid:10,euser:10,%cpu:5,%mem:5,comm:20,command | head -1'
alias ps-eda '(psc | grep -i "\/eda\/" | sort -n && psc-head)'
alias ps-eda-clean '(psc | grep -i "\/eda\/" | sort -n | cut -c -66 && psc-head)'
alias ps-users '(psc | grep -v -E " root | nobody | daemon | messagebus | nmetrics | intelmta |sbin/|sort -n" | sort -n && psc-head)'
alias ps-proc '(ps -p \!* -o bsdtime:10,pid:10,euser:10,%cpu:5,%mem:5,comm:20,command && psc-head)'
alias ps-grep '(psc | grep -i \!* | gvg | sort -n && psc-head)'
alias ps-grep-clean '(psc | grep -i \!* | sort -n | cut -c -66 && psc-head)'
#### package / rpm stuff
alias rpm-find-file 'rpm -qf \!*'
#### build stuff
alias ld-path 'ld --verbose | grep SEARCH | tr " " "\n" | cut -d\" -f2'
alias dlinker-path 'readelf -l /bin/echo | grep interpreter | cut -d: -f2 | cut -d" " -f2 | cut -d] -f1 | xargs ls -l'
#### fun stuff
alias rot13 tr \'a-zA-Z\' \'n-za-mN-ZA-M\'
#### vnc stuff
alias vncserv 'vncserver -geom 1600x1200 -randr 1580x1170,1600x1200,1920x1200,2560x1600'
#### cdislookup stuff
alias cvg '/usr/intel/bin/cdislookup -w "\!*"'
alias cvi '/usr/intel/bin/cdislookup -i "\!*"'
#### ls stuff
alias ls 'ls --color=auto'
alias lt 'ls -lart'
alias ll 'ls -al'
alias lld 'll -d */ .*/'
alias newest-file 'ls -1atr "\!*" | tail -n1'
alias newest-file-ls 'ls -altr "\!*" | tail -n1'
#### du / df stuff
alias dush 'du -smc * | sort -n | tail'
#### printer stuff
alias print-me 'genscript -v -G -j -r -U 2'
#### screen stuff
alias screen-reattach 'screen -raAd'
Subscribe to:
Posts (Atom)