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
# This code is under the MIT license. | |
# Inspired by this StackOverflow question: | |
http://stackoverflow.com/questions/3295405/creating-django-objects-with-a-random-primary-key | |
import struct | |
from Crypto.Cipher import DES | |
from django.db import models | |
def base36encode(number): |
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/sh | |
# Ubuntu-specific modification of http://wiki.dropbox.com/TipsAndTricks/ShareScreenshots | |
# Change these | |
DB_USER_ID=YOURDBUSERID | |
BITLY_USERNAME=YOURBITLYUSERNAME | |
BITLY_API_KEY=YOURBITLYKEYHERE | |
DROPBOX_PUBLIC_DIR=~/Dropbox/Public | |
SCREENSHOT_DIR=screenshots |
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
Mar 31, 2011 12:15:22 PM org.apache.catalina.core.AprLifecycleListener init | |
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/server:/usr/lib/jvm/java-6-openjdk/jre/lib/i386:/usr/lib/jvm/java-6-openjdk/jre/../lib/i386:/usr/java/packages/lib/i386:/usr/lib/jni:/lib:/usr/lib | |
Mar 31, 2011 12:15:22 PM org.apache.coyote.http11.Http11Protocol init | |
INFO: Initializing Coyote HTTP/1.1 on http-8080 | |
Mar 31, 2011 12:15:22 PM org.apache.catalina.startup.Catalina load | |
INFO: Initialization processed in 549 ms | |
Mar 31, 2011 12:15:22 PM org.apache.catalina.core.StandardService start | |
INFO: Starting service Catalina | |
Mar 31, 2011 12:15:22 PM org.apache.catalina.core.StandardEngine start | |
INFO: Starting Servlet Engine: Apache Tomcat/6.0.24 |
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
bender:pycco(laginha|…)% pycco *.py -a -p | |
pycco = setup.py -> docs/docs/./setup.html | |
pycco = test.py -> docs/docs/./test.html | |
Traceback (most recent call last): | |
File "/usr/local/bin/pycco", line 9, in <module> | |
load_entry_point('Pycco==0.2.0', 'console_scripts', 'pycco')() | |
File "/usr/local/lib/python2.6/dist-packages/Pycco-0.2.0-py2.6.egg/pycco/main.py", line 508, in main |
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
javascript:(function(){$('body').children('[id^=mw], #content, #footer').show().filter('#mw-sopaOverlay').hide();})() |
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
{ | |
"queue_status": "running", | |
"_embedded": { | |
"jobs": [ | |
{ | |
"_links": { | |
"self": { "href": "/queue/job1" }, | |
} | |
"status": "queued" | |
}, |
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
"""File for testing OS path separators in Python | |
Execute this file like this: | |
python test_path.py c:/path/to/a/file.txt | |
""" | |
import sys | |
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
run: | |
python manage.py runserver_plus || python manage.py runserver | |
shell: | |
python manage.py shell_plus || python manage.py shell |
This file has been truncated, but you can view the full file.
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/sh | |
if which nmap > /dev/null ; then | |
echo "Running nmap as root\n" | |
IP_RANGE=$(ip addr | grep "inet " | awk '{ print $2}' | grep -v 127.0.0) | |
sudo nmap -sP $IP_RANGE | grep -B2 -i 'b8:27:eb\|80:1f:02' | |
else | |
if which arp-scan > /dev/null ; then | |
echo "Running arp-scan as root\n" | |
sudo arp-scan --interface=eth0 --localnet | grep 'b8:27:eb\|80:1f:02' | |
else |
OlderNewer