View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
View Before and after image slider.markdown
View RedisPythonPubSub1.py
import redis
import threading
class Listener(threading.Thread):
def __init__(self, r, channels):
threading.Thread.__init__(self)
self.redis = r
self.pubsub = self.redis.pubsub()
self.pubsub.subscribe(channels)
View sign_request.js
var crypto = require('crypto'),
url = require('url'),
URLSafeBase64 = require('urlsafe-base64');
function GenerateSignature(privateKey, query) {
var u = url.parse(query);
var urlToSign = u.path;
var decodedKey = URLSafeBase64.decode(privateKey);
var signature = crypto.createHmac('sha1', decodedKey).update(urlToSign);
var encodedSignature = URLSafeBase64.encode(signature.digest());
View codifica.c
int codifica(void* valores, char *campos) {
char tipo;
int acc = 0;
int i;
int temint = 0;
int ultimoChar = 0;
int padding = 0;
int pad = 0;
for (i=0;i<=strlen(campos);i++) {
View codifica.c
int codifica(void* valores, char *campos) {
char tipo;
int acc = 0;
int acc2 = 0;
int i;
for (i=0;i<=strlen(campos);i++) {
tipo = campos[i];
// p = *(int*)valores;
// v = (*((int*)valores+1));