Skip to content

Instantly share code, notes, and snippets.

View jlcampana's full-sized avatar
:octocat:
emu emu emu...

Jose Luis Campaña jlcampana

:octocat:
emu emu emu...
View GitHub Profile
@jlcampana
jlcampana / gist:00a5c4f7f50d8353537e
Created October 17, 2015 12:34
Eliminar separador de la última celda
self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 1)];
@jlcampana
jlcampana / bashprofile_local.sh
Last active August 31, 2015 08:32
scripts4ZMServer
alias zmserver='ssh [email protected]'
alias zmtunel='ssh -L 8080:127.0.0.1:8080 [email protected]'
alias ndebug='node-debug --no-debug-brk'
@jlcampana
jlcampana / a.sh
Created August 21, 2015 10:18
.bash_profile node
alias zmserver='ssh [email protected]'
alias zmtunel='ssh -L 8080:127.0.0.1:8080 [email protected]'
alias ndebug='node-debug --no-debug-brk'
@jlcampana
jlcampana / demo
Last active August 29, 2015 14:20
// usage demo:
.block {
width: 100px;
margin: 20px;
height: 100px;
}
.hsl {
background-color: hsl(118, 77%, 53%);
}
.rgb {
@jlcampana
jlcampana / .bash_profile
Created February 13, 2015 11:07
Bash profile del curro
export LC_CTYPE=en_US.UTF-8
export CLICOLOR=1
export LSCOLORS=gxGxFxdxbxDxDxBxBxExEx
export HISTCONTROL=erasedups
export HISTSIZE=100000
shopt -s histappend
LIGHT_RED="\[\033[0;91m\]"
LIGHT_MAGENTA="\[\033[0;95m\]"
@jlcampana
jlcampana / avoid_duplicates.js
Created February 11, 2015 14:04
Avoid duplicates in JavaScript
var a = [1,2,3,4,5,6,7,7,7,7,7,8];
a = a.filter(function(item, pos) {
return a.indexOf(item) == pos;
});
@jlcampana
jlcampana / spliceArray.js
Created February 11, 2015 08:36
Meter un array en medio de un array
Array.prototype.spliceArray = function(index, n, array) {
return Array.prototype.splice.apply(this, [index, n].concat(array));
}
export PATH=/usr/local/sbin:/usr/local/bin:$PATH
export LC_CTYPE=en_US.UTF-8
export CLICOLOR=1
export LSCOLORS=gxGxFxdxbxDxDxBxBxExEx
export HISTCONTROL=erasedups
export HISTSIZE=100000
shopt -s histappend
@jlcampana
jlcampana / gist:6d0e6bdb49693fc2bb21
Last active August 29, 2015 14:10
Some basic linux config
#Timezone
dpkg-reconfigure tzdata
#Cambiar el shell predeterminado para un user
chsh pandi
#Configurar AFP (http://missingreadme.wordpress.com/2010/05/08/how-to-set-up-afp-filesharing-on-ubuntu/)
apt-get install netatalk
#locale ES
apt-get install language-pack-es-base
#crear user pandi y añadirlo a sudoers
adduser pandi
@jlcampana
jlcampana / gist:0f855662d70756d47981
Created November 22, 2014 15:04
Ubuntu server to SD Card (OSX)
diskutil list
#If the disk is the 4...
diskutil unmountDisk /dev/disk4
sudo dd if=~/Downloads/ubuntu-14.04lts-server-odroid-x2-20140604.img of=/dev/rdisk4 bs=1m
diskutil eject /dev/rdisk4