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/python | |
import feedparser | |
import json | |
import re | |
import urllib | |
import tempfile | |
import subprocess | |
import os | |
LIBS = ['libnds','filesystem','libfat','dswifi','maxmod','default_arm7'] |
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 | |
# requires the "MacFSEvents" package | |
import fsevents | |
import time | |
import sys | |
import os | |
import subprocess | |
observer = fsevents.Observer() |
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
server { | |
listen 8140 ssl; | |
server_name puppet.example.com; | |
passenger_enabled on; | |
passenger_set_cgi_param SSL_CLIENT_S_DN $ssl_client_s_dn; | |
passenger_set_cgi_param SSL_CLIENT_VERIFY $ssl_client_verify; | |
access_log /var/log/nginx/puppet_access.log; | |
error_log /var/log/nginx/puppet_error.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
server { | |
listen 80; | |
server_name dashboard.example.com; | |
passenger_enabled on; | |
access_log /var/log/nginx/puppet-dashboard_access.log; | |
error_log /var/log/nginx/puppet-dashboard_error.log; | |
root /usr/share/puppet-dashboard/public; |
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 | |
rmate_name="/tmp/rmate-$RANDOM.sh" | |
ssh "$1" "cat >> $rmate_name" <<'ENDRMATESCRIPT' | |
# rmate | |
# Copyright (C) 2011-2013 by Harald Lapp <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or |
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/python | |
import sys | |
import subprocess | |
import Queue | |
from watchdog.observers import Observer | |
from watchdog.events import FileSystemEventHandler | |
class QueuingEventHandler(FileSystemEventHandler): | |
def __init__(self, queue): |
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
/* | |
* We should really look for the smallest 32bit integer type, | |
* but this will do for prototyping on a 32-bit OS | |
*/ | |
typedef unsigned int gss_uint32; | |
typedef unsigned int OM_uint32; | |
/* | |
* Now define the three implementation-dependent types. | |
*/ |
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 gevent | |
import socket | |
threadpool = gevent.get_hub().threadpool # this is the default gevent threadpool | |
urls = ['www.google.com', 'www.example.com', 'www.python.org'] | |
results = threadpool.map(socket.gethostbyname, urls) | |
# >>> results | |
# ['173.194.34.179', '93.184.216.119', '185.31.18.175'] |
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
DEBUG:echo:3 is handling a request in <Greenlet at 0x110184550: uwsgi_gevent_request(4539005552L)> | |
[pid: 99684|app: 0|req: 2/3] 127.0.0.1 () {40 vars in 806 bytes} [Mon May 12 20:34:00 2014] GET / => generated 1383 bytes in 0 msecs (HTTP/1.1 200) 2 headers in 81 bytes (3 switches on core 999) | |
!!! uWSGI process 99686 got Segmentation Fault !!! | |
*** backtrace of 99686 *** | |
0 uwsgi 0x000000010c551ff0 uwsgi_backtrace + 48 | |
1 uwsgi 0x000000010c552533 uwsgi_segfault + 51 | |
2 libsystem_platform.dylib 0x00007fff8a5dc5aa _sigtramp + 26 | |
3 ??? 0x000000010c888050 0x0 + 4505239632 | |
4 Python 0x000000010c76401f PyEval_CallObjectWithKeywords + 93 | |
5 uwsgi 0x000000010c56a4b7 python_call + 23 |
OlderNewer