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
#! /usr/bin/env python | |
import os | |
import tornado.httpserver | |
import tornado.ioloop | |
import tornado.wsgi | |
import sys | |
import django.core.handlers.wsgi | |
sys.path.append('/your/project/path/') | |
def main(): | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' |
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
cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys' |
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
tail -f log/development.log |
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
Do you have this at the beginning of your script: | |
# -*- coding: utf-8 -*- |
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
// Split window on open file | |
:split filetoopen.py or vertical :vsplit sistema.py | |
// For navigate on windows intances | |
Ctrl+w+Arrows or Ctrl+ww | |
// Show numbers on lines | |
:set number | |
// Search & replace |
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
if DEBUG: | |
from fnmatch import fnmatch | |
class glob_list(list): | |
def __contains__(self, key): | |
for elt in self: | |
if fnmatch(key, elt): return True | |
return False | |
INTERNAL_IPS = glob_list(['127.0.0.1', '192.168.*.*']) |
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
#!/usr/local/bin/ruby | |
####################################################### | |
# | |
# Ruby interactive input/eval loop | |
# Written by matz ([email protected]) | |
# Modified by Mark Slagell ([email protected]) | |
# with suggestions for improvement from Dave Thomas | |
# ([email protected]) | |
# |
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
st = "\033[7m" | |
en = "\033[m" | |
while TRUE | |
print "str> " | |
STDOUT.flush | |
str = gets | |
break | |
if not str | |
str.chop! | |
print "pat> " |
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
Go to the end of the line: ctrl+e | |
Go to the beginning of the line: ctrl+a | |
Move by one letters at a time: ctrl+f (ctrl+b to go backwards) | |
Move by word alt+f (alt+b to go backwards) | |
Delete words: alt+d (remember that you need to be in the beginning of the word) |
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
heroku keys:add ~/.ssh/id_rsa.pub |
OlderNewer