This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print "Hello World" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Requires jQuery*/ | |
function clone(from, to){ | |
// Do this before clone | |
$('[type=text], textarea').each(function(){ this.defaultValue = this.value; }); | |
$('[type=checkbox], [type=radio]').each(function(){ this.defaultChecked = this.checked; }); | |
$('select option').each(function(){ this.defaultSelected = this.selected; }); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Enlace simbólico en GNU/Linux | |
$ ln -s /ruta/directorio/original /ruta/directorio/destino |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install https://github.com/user/repo/zipball/master | |
or | |
pip install https://github.com/user/repo/tarball/master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Creamos nuestro lienzo canvas de 300x100 pixels --> | |
<canvas height="100" id="canvas" width="300"></canvas> | |
<!-- Creamos el javascript para dibujar nuestro Hola Mundo --> | |
<script type="text/javascript"> | |
// Definimos un evento que espere que se carga la | |
// página (load) antes de ejecutar nuestro script | |
window.addEventListener('load', function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Xorg.conf does not exist by default any more | |
Boot into recovery mode and select Root Shell. Then run: | |
X -configure | |
Then: | |
cp /root/xorg.conf.new /etc/X11/xorg.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd project | |
$ nano package.json | |
{ | |
"name": "", | |
"version": "", | |
"description": "", | |
"main": "index.html", | |
"author": "", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# polls/templatetags/poll_extras.py | |
from django import template | |
from polls.models import Choice, Poll | |
register = template.Library() | |
@register.filter(name='total_votes') | |
def total_votes(poll): | |
total = 0 # contador |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH=${PATH}:~/sdk/platform-tools:~/sdk/tools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql | |
service mysql restart |
OlderNewer