Skip to content

Instantly share code, notes, and snippets.

@johnmyleswhite
johnmyleswhite / type_inference.jl
Created August 9, 2013 17:57
Julia's type inference is where you get performance
# Always ignore one run
x = 0
@elapsed for i in 1:100_000_000
x += 1
end # => 3.330939854
# Second time is more accurate
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 25, 2024 06:23
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@domenic
domenic / 1flickrApi.js
Last active April 4, 2018 07:35
Flickr API experiments
"use strict";
// Uses jQuery and Q.
var API_KEY = "whatever";
function getFlickrResponseAsync(method, responseProperty, params) {
var deferred = Q.defer();
$.ajax("http://www.flickr.com/services/rest/", {
@robin-wittler
robin-wittler / gist:1643718
Created January 19, 2012 23:33
example code where ForeignKey and type check fails for flask-sqlalchemy
#!/usr/bin/python
# -*- coding: utf-8 -*-
from flask import Flask
from flaskext.sqlalchemy import SQLAlchemy
from werkzeug.security import generate_password_hash
from werkzeug.security import check_password_hash
from sqlalchemy.orm.exc import NoResultFound
app = Flask(__name__)