Skip to content

Instantly share code, notes, and snippets.

View squeaky-pl's full-sized avatar

Paweł Piotr Przeradowski squeaky-pl

View GitHub Profile
find . -regex ".*-v[a-f0-9][a-f0-9][a-f0-9].*"
diff --git a/lib/boot.js b/lib/boot.js
index 9ad4076..66cc56c 100644
--- a/lib/boot.js
+++ b/lib/boot.js
@@ -27,6 +27,9 @@ requirejs.config({
'vendor/crypto': {
exports: 'CryptoJS'
},
+ 'vendor/videojs/video': {
+ exports: '_V_'
#assuming there is os.path import dirname, join
def Tcl_AppInit(app):
+ lib_path = join(dirname(dirname(dirname(__file__))), 'lib')
+ tcl_path = join(lib_path, 'tcl')
+ tk_path = join(lib_path, 'tk')
+ tklib.Tcl_Eval(app.interp, 'set tcl_library "{0}"'.format(tcl_path))
+ tklib.Tcl_Eval(app.interp, 'set tk_library "{0}"'.format(tk_path))
+
Directive
app.directive \component, [\$injector \$compile \$q (injector, compile, q) ->
deferred = q.defer!
promise = deferred.promise
scope: {}
restrict: 'A'
compile: (element, attrs) ->
require [attrs.component] (component) ->
from __future__ import print_function
import signal
import gevent
import zmq.green as zmq
import psycopg2
from psycogreen.gevent import patch_psycopg
patch_psycopg()
from __future__ import print_function
import signal
import gevent
import zmq.green as zmq
import psycopg2
from psycogreen.gevent import patch_psycopg
from gevent import pywsgi
from gevent.monkey import patch_all
# gunicorn -k "geventwebsocket.gunicorn.workers.GeventWebSocketWorker" -w 4 server:handle_request
import gevent
from gevent.monkey import patch_all
from pprint import pprint
from StringIO import StringIO
patch_all()
# uwsgi --module uwsgiws --callable application --master --http :8080 --http-websockets --gevent 100
# this works
import uwsgi
from gevent.monkey import patch_all
patch_all()
# consumer
from __future__ import print_function
import gevent
from gevent.monkey import patch_all
import psycogreen.gevent
import psycopg2
from array import array
LOOP = 10000
a = array('B')
b = array('B')
c = array('H')
with open('/dev/urandom') as f: