This file contains hidden or 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
# You may add here your | |
# server { | |
# ... | |
# } | |
# statements for each of your virtual hosts | |
server { | |
listen 80 default; | |
server_name domain.com; |
This file contains hidden or 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 zmq | |
import threading | |
import uuid | |
import time | |
import itertools | |
from homingbird import Node, LocalNode | |
def get_random(): | |
return str(uuid.uuid4()).replace('-','') |
This file contains hidden or 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 pbs import git, cd, pwd | |
from cmd2 import Cmd | |
class GitPrompt(Cmd): | |
def __init__(self, *args, **kwargs): | |
Cmd.__init__(self, *args, **kwargs) | |
self.base_dir = '/home/jself/devel/cms_dev/src/' | |
self.repos = ['storyville', 'medley-templates', 'signin'] |
This file contains hidden or 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
#init compinit, colors | |
autoload -Uz compinit; compinit | |
autoload -U colors && colors | |
#options | |
setopt inc_append_history | |
setopt share_history | |
setopt autopushd pushdminus pushdsilent pushdtohome | |
setopt auto_menu | |
setopt complete_in_word |
This file contains hidden or 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 python2 | |
import urllib2 | |
import sys | |
import re | |
import threading | |
from hashlib import md5 | |
def get_images(url): | |
r = re.compile('//images.4chan.org/[^"]*(?:.jpg|.jpeg|.bmp|.gif|.png)') |
This file contains hidden or 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
def wrapper(func): | |
def newfunc(*args, **kwargs): | |
print "In the new func, ignoring the old" | |
return newfunc | |
@wrapper | |
def hello(): | |
print "In hello func" | |
hello() |
This file contains hidden or 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 A(object): | |
def printer(self, text): | |
print text | |
def wrapped(func): | |
def newprinter(self, text): | |
print "Here: %s"%text | |
return newprinter |
This file contains hidden or 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
def get_agent_id(self, agent_id): | |
if not hasattr(self, '_agent_ids'): | |
self._agent_ids = {} | |
if agent_id in self.agent_ids: | |
return self.agent_ids[agent_id] | |
a_id_list = self.list_agent_id() | |
for a in a_id_list: | |
if a == agent_id: | |
self.agent_ids[agent_id] = a | |
return a |
This file contains hidden or 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
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"path/filepath" | |
) |
This file contains hidden or 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
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"path/filepath" | |
) |
OlderNewer