Skip to content

Instantly share code, notes, and snippets.

View jansanchez's full-sized avatar

Jan Sanchez jansanchez

View GitHub Profile
Se modifica el archivo en modo adminitrador:
~ sudo [nombre_editor] /etc/environment/
y se agregan estas líneas
no_proxy="127.0.0.1,localhost"
NO_PROXY="127.0.0.1,localhost"
all_proxy=socks://172.21.0.83:3128/
ALL_PROXY=socks://172.21.0.83:3128/
@jansanchez
jansanchez / gist:7702069
Created November 29, 2013 05:56
Run a php server from terminal

Run a php server from terminal

type in your terminal

php -f index.php -S localhost:8080
@jansanchez
jansanchez / gist:7548257
Created November 19, 2013 16:35
Read Gmail in Terminal

Read Gmail in Terminal

###creake the file gmail.sh with this content

#!/bin/bash
curl -u username --silent "https://mail.google.com/mail/feed/atom/all" | tr -d '\n' | awk -F '<entry>' '{for (i=2; i<=NF; i++) {print $i}}' | sed -n "s/<title>\(.*\)<\/title.*name>\(.*\)<\/name>.*/ ⬓ \2 - \1/p"

####Type your username

@jansanchez
jansanchez / gist:7441035
Last active December 28, 2015 04:18
Import database from console

Import database from console

###Type in terminal

mysql -u root -p

###Type your password

@jansanchez
jansanchez / gist:7362124
Last active March 4, 2016 22:07
Install firefox in crunchbang

Install firefox in crunchbang

###first, remove iceweasel

sudo apt-get remove iceweasel

###Open sources.list

@jansanchez
jansanchez / gist:7309449
Last active December 27, 2015 10:09
Crear un repositorio GIT y apuntarlo a una ubicacion de red

Crear un repositorio GIT y apuntarlo a una ubicacion de red

###Iniciamos un nuevo repositorio

git init --bare miProyecto.git

###Ingresar al proyecto al que le vamos a generar el bare y tipear lo siguiente:

@jansanchez
jansanchez / gist:7157377
Last active December 26, 2015 13:19
Enable numlock when crunchbang start

Enable numlock when crunchbang start

###install numlockx

sudo apt-get install numlockx

Open ~/.config/openbox/autostart

@jansanchez
jansanchez / gist:7002914
Created October 16, 2013 05:11
install zsh
# first
sudo apt-get install zsh
#
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
@jansanchez
jansanchez / tips
Created October 10, 2013 20:23 — forked from andru255/tips
1. o minuscula = ubica el cursor a la sgte linea listo para escribir osea entra a modo inserción y enfoca al cursor a la linea sgte
1.1 O = crea una linea nueva sobre el cursor donde estoy y entra a modo insercion y enfoca el cursor a esa nueva linea.
2. :w [ruta_del_archivo] = para guardar un archivo en otra ruta
3. h j k l = izquiera, abajo, arriba, derecha
4. u: para deshacer
@jansanchez
jansanchez / gist:6922591
Last active December 25, 2015 05:09
copy and paste - VIM

Copy and Cut

  • 3yy copia 3 líneas contando aquella en la que nos encontramos.

  • 10dd corta 10 líneas a partir de la actual.

Paste