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 django.http import HttpResponse, HttpResponseRedirect | |
from django.template import RequestContext | |
from django.shortcuts import get_object_or_404, render_to_response | |
import threading | |
import pdb | |
def threaded_pdb_example_page(request): | |
def debug(args, **kwargs): | |
request = args['request'] |
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 requests | |
r = requests.get('https://gun.io') | |
print r.content |
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 | |
from subprocess import Popen, PIPE | |
import sys | |
domain = sys.argv[1] | |
proc = Popen(["whois", domain], stdout=PIPE) | |
output = proc.communicate()[0] | |
notice_loc = output.find('NOTICE') |
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
HaB™ |
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
1 import urllib2 | |
2 import json | |
221 def basic_authorization(user, password): | |
222 s = user + ":" + password | |
223 return "Basic " + s.encode("base64").rstrip() | |
224 | |
225 def submit_pull_request(user, repo): | |
226 auth = (settings.username, settings.password) | |
227 url = 'https://api.github.com/repos/' + user + '/' + repo + '/pulls' |
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
<script type="text/javascript"> | |
var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']); | |
_gaq.push(['_setDomainName', 'none']); | |
_gaq.push(['_setAllowLinker', true]); | |
_gaq.push(['_trackPageview']); | |
(function() { | |
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
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
#!monit | |
set logfile /var/log/monit.log | |
check process nodejs with pidfile "/var/www/NODEAPP/YOUR_APP.pid" | |
start program = "/etc/init.d/node_app start" | |
stop program = "/etc/init.d/node_app stop" | |
if failed port 8080 protocol HTTP | |
request / | |
with timeout 10 seconds | |
then restart |
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
/* | |
node-http-proxy | |
with websockets from socketio | |
*/ | |
var util = require('util'), | |
colors = require('colors'), | |
websocket = require('../../vendor/websocket'), | |
httpProxy = require('../../lib/node-http-proxy'); |
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
<script type="text/javascript" src="https://github.com/Miserlou/Blaccupy/raw/master/blaccupy.js"></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
<script type="text/javascript" src="https://github.com/Miserlou/Blaccupy/raw/master/blaccupy.js"></script> |
OlderNewer