Skip to content

Instantly share code, notes, and snippets.

View promise-loop-sequence.js
var urlList = model.getURLs();
var loadAndParse = function (url)
// both load() and parse() are promise based functions
return load(url).then(parse);
* Allows for the sequentially calling of promise based functions by iterating over a list of
import os
View user-initials.html
<title>User Initials</title>
/* Relevant Code */
.person {
display: table;
margin: 24px auto;
metasmile / TypedIterableCapabilty.h
Last active Aug 25, 2015
a macro for support ios9's new typed iterable.
View TypedIterableCapabilty.h
#define __typed_iterable(iterablesCls, elementsType) iterablesCls<elementsType> *
#define __typed_iterable(iterablesCls, elementsType) iterablesCls *
#define __ktyped_iterable(iterablesCls, elementsType) iterablesCls<__kindof elementsType> *
#define __ktyped_iterable(iterablesCls, elementsType) iterablesCls *
View tiled_loader.pde
import gifAnimation.*;
GifMaker gifExport;
int frames = 0;
int totalFrames = 120;
public void setup() {
size(360, 360);
kdr213 / gist:17e8a5744da64bb5fef9
Last active Aug 25, 2015 — forked from rtt/gist:5a2e0cfa638c938cca59
example python tinderbot
View gist:17e8a5744da64bb5fef9
# encoding: utf8 1,1 Top# encoding: utf8
import argparse
from datetime import datetime
import json
from random import randint
import requests
import sys
from time import sleep
View .sbclrc
;;; Better printing for hash tables
(set-pprint-dispatch 'hash-table
(lambda (str ht)
(format str "{~{~{~S => ~S~}~^, ~}}"
(loop for key being the hash-keys of ht
for value being the hash-values of ht
collect (list key value)))))
View gist:c20d57be953e78cadfc3
<?xml version="1.0" encoding="UTF-8"?>
<!-- This stylesheet will generate a tsv file from an EAD container list. It will catch all c0X elements that have a did/container child -->
<xsl:stylesheet xmlns:xsl="" version="1.0">
<!-- We don't want an xml declaration in the output, since this will just be a tab-separated text file-->
<xsl:output omit-xml-declaration="yes"/>
<!-- We don't want extra space floating around -->
View gist:6286073ab5e890886e30
"always_show_minimap_viewport": false,
"color_scheme": "Packages/Color Scheme - Default/Monokai Bright.tmTheme",
"copy_with_empty_selection": false,
"default_encoding": "UTF-8",
"detect_indentation": false,
"font_size": 10,
"highlight_line": true,
"highlight_modified_tabs": true,
View boot.ini.erb
# Possible screen resolutions
# Uncomment only a single Line! The line with setenv written.
# At least one mode must be selected.
# setenv m "vga" # 640x480
# setenv m "480p" # 720x480
# setenv m "576p" # 720x576
# setenv m "800x480p60hz" # 800x480
You can’t perform that action at this time.