Skip to content

Instantly share code, notes, and snippets.

@Krayons
Krayons / gist:1381317
Created November 21, 2011 01:02
For Poo
#views.py
#Response
from pyramid.response import Response
from pyramid.view import view_config
from pyramid.renderers import render_to_response
from pyramid.url import route_url
#Security
from pyramid.security import authenticated_userid
from pyramid.security import remember
@Krayons
Krayons / test.py
Created September 26, 2012 21:19
import directory
import os, sys, inspect
# realpath() with make your script run, even if you symlink it :)
cmd_folder = os.path.realpath(os.path.abspath(os.path.split(inspect.getfile( inspect.currentframe() ))[0]))
if cmd_folder not in sys.path:
sys.path.insert(0, cmd_folder)
# use this if you want to include modules from a subforder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"subfolder")))
if cmd_subfolder not in sys.path:
sys.path.insert(0, cmd_subfolder)
import re
from urllib import quote_plus
class TvRage:
APIKEY = '7FwjZ8loweFcOhHfnU3E'
const MATCH_PROBABILITY = 75
xmlFullSearchUrl = "http://services.tvrage.com/feeds/full_search.php?show=";
xmlFullShowInfoUrl = "http://services.tvrage.com/feeds/full_show_info.php?sid=";
con_enable "1"
cl_cmdrate "60" //Amount of updates sent to server per second
cl_updaterate "60" //Amount of updates received from server per second
rate "80000" //Total amount of bandwith dota may use
cl_interp "0" //More network stuff below...
cl_interp_ratio "1"
cl_smooth "1"
cl_smoothtime "0.01"
cl_lagcompensation "1"
cl_pred_optimize "2"
*.py[cod]
# C extensions
*.so
# Packages
*.egg
*.egg-info
dist
build
@Krayons
Krayons / cors_server.py
Last active August 29, 2015 14:05 — forked from enjalot/cors_server.py
python 3 for of enjalot/cors_server.py
import http.server
class CORSHTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
def send_head(self):
"""Common code for GET and HEAD commands.
This sends the response code and MIME headers.
Return value is either a file object (which has to be copied
to the outputfile by the caller unless the command was HEAD,
and must be closed by the caller under all circumstances), or

Keybase proof

I hereby claim:

  • I am krayons on github.
  • I am krayons (https://keybase.io/krayons) on keybase.
  • I have a public key whose fingerprint is BCA5 3807 218C 878C F49A 35AE C570 BB36 E726 CFDF

To claim this, I am signing this object:

upstream openbazaar {
server 127.0.0.1:8888;
}
server {
server_name subdomain.ofdomainiown.com;
location / {
proxy_set_header Host $http_host;
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.16.0-51-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/kyle/projects/eris/bank.js/node_modules/eris-contracts/node_modules/eris-db/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v4.2.1

Keybase proof

I hereby claim:

  • I am krayons on github.
  • I am krayons (https://keybase.io/krayons) on keybase.
  • I have a public key ASAT-8S7hr7HsKY0laM1vHOJ1_XT0sHm8_zr_pQbJB4Q9Qo

To claim this, I am signing this object: