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 redis | |
from gevent import socket | |
redis.connection.socket = socket |
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
## Copyright (C) 2011 by Jiang Yio <http://inportb.com/> | |
## Please find instructions at <http://wiki.inportb.com/python:geventreactor> | |
## The latest code is available at <https://gist.github.com/848058> | |
## | |
## Permission is hereby granted, free of charge, to any person obtaining a copy | |
## of this software and associated documentation files (the "Software"), to deal | |
## in the Software without restriction, including without limitation the rights | |
## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
## copies of the Software, and to permit persons to whom the Software is | |
## furnished to do so, subject to the following conditions: |
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 | |
# -*- coding: utf-8 -*- | |
import sys | |
import random | |
from django.conf import settings | |
from django.core.management import setup_environ | |
s = { | |
"DATABASE_ENGINE": "django.db.backends.postgresql_psycopg2", |
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 deployment.cuisine import * | |
from fabric.api import * | |
from fabric.context_managers import * | |
from fabric.utils import puts | |
from fabric.colors import red, green | |
import simplejson | |
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
package main | |
import ( | |
"log" | |
"io" | |
"os" | |
"crypto/tls" | |
"strings" | |
"net" | |
"flag" |
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
package main | |
import ( | |
"container/list" | |
"flag" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"log" | |
"net/http" |
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 os | |
def findInSubdirectory(filename, subdirectory=''): | |
if subdirectory: | |
path = subdirectory | |
else: | |
path = os.getcwd() | |
for root, dirs, names in os.walk(path): | |
if filename in names: | |
return os.path.join(root, filename) |
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
// Copyright 2011 The Go Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
// Modify by linuz.ly | |
package main | |
import ( | |
"bytes" | |
"fmt" | |
"code.google.com/p/go.crypto/ssh" |
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
set shell=/bin/bash | |
if $TERM == "xterm" | |
set t_Co=256 " 256 colors | |
endif | |
set nocompatible " be iMproved | |
let mapleader="," " change the leader to be a comma vs slash | |
filetype off " required! | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() |
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
snippet import | |
import ( | |
${1} | |
) | |
snippet const | |
const ( | |
${1} | |
) | |
snippet err | |
if err != nil { |
OlderNewer