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> |
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 | |
"""Replacement for htpasswd. | |
Original author: Eli Carter | |
source (rev 6551): | |
http://trac.edgewall.org/browser/trunk/contrib/htpasswd.py | |
""" | |
import os |
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
class ValidateModelMixin(object): | |
"""Make :meth:`save` call :meth:`full_clean`. | |
.. warning: | |
This should be the left-most mixin/super-class of a model. | |
Do you think Django models ``save`` method will validate all fields | |
(i.e. call ``full_clean``) before saving or any time at all? Wrong! |
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
"""Download stories of a Pivotal Tracker project. | |
You need the project ID (an int) and your API token. The latter can be | |
obtained in ``https://www.pivotaltracker.com/profile``, or using curl:: | |
$ curl -u username:password -X GET https://www.pivotaltracker.com/services/v3/tokens/active | |
""" | |
import getpass | |
import pickle |
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
{% load admin_static %}{% load url from future %}<!DOCTYPE html> | |
<html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}> | |
{% comment %} | |
This template is almost a copy (with indentation corrections and modifications listed below) of | |
'django/contrib/admin/templates/admin/base.html' and overrides it by living in directory | |
'/templates/admin/', as instructed in documentation: | |
"For those templates that cannot be overridden in this way, you may still override them for | |
your entire project. Just place the new version in your templates/admin directory." | |
https://docs.djangoproject.com/en/1.4/ref/contrib/admin/#overriding-admin-templates |
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
/var/log/supervisor/*.log { | |
weekly | |
rotate 52 | |
compress | |
delaycompress | |
notifempty | |
missingok | |
copytruncate | |
} |
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
# source: https://svn.cs.brynmawr.edu/pyrobot/trunk/pyrographics.py | |
# grabbed in 2013.10.10 by German Larrain | |
# | |
# I modified it a bit to be able to run and import this module by itself | |
# (i.e. with no dependencies towards "pyrobot"). | |
# --- pyrographics.py.0 2013-10-10 10:37:03.784159860 -0300 | |
# +++ pyrographics.py.1 2013-10-10 10:37:44.564362077 -0300 | |
# @@ -126,14 +126,9 @@ |
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 )) |