Skip to content

Instantly share code, notes, and snippets.

View dlemmon's full-sized avatar

David dlemmon

View GitHub Profile
@dlemmon
dlemmon / set proxy
Last active May 18, 2018 09:19
Set proxy variables from bash when you don't want to have the password hardcoded, or in a command history. Works in windows with git bash
#!/bin/bash
[[ $_ != $0 ]] && echo "Write your password:" ||
echo "You need to call this from the source command: source $(basename $0)"
PROTOCOL=http
USERNAME=myuser
HOST=proxy.bigevilcorporation.com
PORT=8009
@dlemmon
dlemmon / Config_Debian_Proxy.sh
Created October 23, 2012 12:34 — forked from isholgueras/Config_Debian_Proxy.sh
Configuración de servidores Debian 6 después de instalar el SO si están detrás de proxy para hacer cosas turbias con Drupal
##### Meter en el .bashrc ################################
export PATH="$PATH:/usr/local/share/drush:/usr/local/bin"
export http_proxy=http://user:pass@IP:Port
export ftp_proxy=$http_proxy
##### Meter en el /etc/apt/sources.list ##################
# non free packages
#deb http://ftp.fr.debian.org/debian/ squeeze non-free
#deb-src http://ftp.fr.debian.org/debian/ squeeze non-free
## Recargar el fichero .bashrc sin tener que reiniciar la consola
@dlemmon
dlemmon / Config_Debian_Proxy.sh
Created October 23, 2012 12:29 — forked from isholgueras/Config_Debian_Proxy.sh
Configuración de servidores Debian 6 después de instalar el SO si están detrás de proxy para hacer cosas turbias con Drupal
##### Meter en el .bashrc ################################
export PATH="$PATH:/usr/local/share/drush:/usr/local/bin"
export http_proxy=http://user:pass@IP:Port
export ftp_proxy=http://user:pass@IP:Port
##### Meter en el /etc/apt/sources.list ##################
# non free packages
deb http://ftp.fr.debian.org/debian/ squeeze non-free
deb-src http://ftp.fr.debian.org/debian/ squeeze non-free
## Recargar el fichero .bashrc sin tener que reiniciar la consola
@dlemmon
dlemmon / gist:2768353
Created May 22, 2012 11:03
Patrones basicos js
//clase tipica
var Dog = function(name) {
this.name = name;
};
Dog.prototype.legs = 4;
Dog.prototype.speak = function() {
return "Un perro de " + this.legs + " patas llamado " + this.name + " dice guau!";
};