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 cffi | |
ffi = cffi.FFI() | |
ffi.cdef(''' | |
void* zmq_init(int); | |
void* zmq_socket(void *ctx, int type); | |
int zmq_bind(void *socket, const char *addr); | |
''') | |
C = ffi.verify('#include <zmq.h>', libraries=['zmq']) | |
ctx = C.zmq_init(1) | |
socket = C.zmq_socket(ctx, 5) |
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
PROMPT='%{$fg[green]%}%c %{$fg[red]%}∞ $(git_prompt_info)%{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="λ %{$fg[blue]%}git %{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%} → %{$reset_color%}" | |
export LSCOLORS="exfxcxdxbxegedabagacad" | |
export LS_COLORS='di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:' |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta charset="utf-8"> | |
<title>Google Maps JavaScript API v3 Example: Marker Simple</title> | |
<link href="https://google-developers.appspot.com/maps/documentation/javascript/examples/default.css" rel="stylesheet"> | |
<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script> | |
<script> | |
function initialize() { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Backbone Inbox</title> | |
</head> | |
<body> | |
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
void test_type(void) { | |
var heap_allocated_type = new(Type, "Meta"); | |
var heap_allocated_type_args = new(Type, "Meta", 1, heap_allocated_type, "meta"); | |
CU_ASSERT(0 == strcmp("Meta", as_str(heap_allocated_type))); | |
//CU_ASSERT(implements_name(heap_allocated_type_args, "meta")); | |
delete(heap_allocated_type); | |
} |
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
void | |
test_client_big_masked_frame(void) | |
{ | |
CU_ASSERT(WS_TEXT_FRAME == type(client_big_masked_frame)); | |
} | |
void | |
test_client_medium_masked_frame(void) | |
{ | |
CU_ASSERT(WS_TEXT_FRAME == type(client_medium_masked_frame)); |
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
#define BYTETOBINARYPATTERN "%d%d%d%d%d%d%d%d" | |
#define BYTETOBINARY(byte) \ | |
(byte & 0x80 ? 1 : 0), \ | |
(byte & 0x40 ? 1 : 0), \ | |
(byte & 0x20 ? 1 : 0), \ | |
(byte & 0x10 ? 1 : 0), \ | |
(byte & 0x08 ? 1 : 0), \ | |
(byte & 0x04 ? 1 : 0), \ | |
(byte & 0x02 ? 1 : 0), \ | |
(byte & 0x01 ? 1 : 0) |
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 coopy.base import init_persistent_system | |
from flask import Flask, json, jsonify | |
app = Flask(__name__) | |
basedir = "/my/path" | |
riobus = init_persistent_system(RioBus(), basedir=basedir) | |
class RioBus(object): | |
def __init__(self): |
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
{ | |
items: [ | |
{ | |
name: "Lista 1" | |
}, | |
{ | |
name: "Lista 1" | |
} | |
] | |
} |
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
{ | |
listas: [ | |
{ | |
name: "Lista 1", | |
created_at: "08/08/2012" | |
}, | |
{ | |
name: "Lista 1", | |
created_at: "08/08/2012" | |
} |