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 | |
# Librerias necesarias | |
import paramiko | |
import os | |
# Datos para la conexion SSH | |
ssh_servidor = '10.0.70.44' | |
ssh_usuario = 'tuusuario' | |
ssh_clave = 'tucontraseña' |
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
# -*- coding: utf-8 -*- | |
import sys | |
import time | |
from PyQt4.QtCore import * | |
from PyQt4.QtGui import * | |
from PyQt4.QtWebKit import * | |
class Screenshot(QWebView): | |
def __init__(self): | |
self.app = QApplication(sys.argv) |
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
#!/bin/bash | |
# source: https://help.ubuntu.com/community/ListInstalledPackagesByDate | |
#creates text file with a list of all packages installed by date | |
#first append all info from archived logs | |
i=2 | |
mycount=$(ls -l /var/log/dpkg.log.*.gz | wc -l) | |
nlogs=$(( $mycount + 1 )) |
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 sh | |
# Uses curl to connect to www.isup.me, a website that checks if a given domain | |
# is up or not. The response will contain "It's just you" if the domain is up. | |
# If not, it will contain "It's not just you". | |
test $# -lt 1 && (echo "Usage: $0 domain [domain2] [domain3] ..."; exit 1;) | |
for domain in "$@"; do | |
echo -n "$domain: " |
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
from urllib2 import urlopen | |
from django.utils.simplejson import loads | |
from oauth2 import Token | |
from social_auth.backends.utils import build_consumer_oauth_request | |
from social_auth.backends.twitter import TwitterAuth | |
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
/* Estructura y Datos de las Regiones, Provincias */ | |
/* y Comunas de Chile. */ | |
/* */ | |
/* Fecha: Julio 2010 */ | |
/* Autor: Juan Pablo Aqueveque - juque.cl */ | |
-- | |
-- Comunas | |
-- | |
DROP TABLE IF EXISTS `comunas`; |
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
[ | |
{ | |
"pk": 6, | |
"model": "lu_base.region", | |
"fields": { | |
"codigo": "15", | |
"orden_geo": 1, | |
"nombre_corto": "Arica y Parinacota", | |
"nombre_largo": "" | |
} |
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
sudo apt-get install build-essential libsqlite3-dev zlib1g-dev libncurses5-dev libgdbm-dev libbz2-dev libreadline5-dev libssl-dev | |
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz | |
tar xz Python-2.7.3.tgz | |
cd Python-2.7.3 | |
./configure | |
make | |
sudo make altinstall | |
python2.7 |
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
import redis | |
redis_host = 'ec2-xxx.amazonaws.com' | |
value = raw_input() | |
r = redis.StrictRedis(host=redis_host, password=value) | |
r.set('foo', 'hellooo') | |
r.get('foo') |
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
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/python");</script> |
OlderNewer