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
jcfr / 2015-08-25_test_cmake_download_from_dropbox.cmake
Last active Aug 25, 2015
Simple CMake script to help Jorge identify issue with the version of CMake used to setup Slicer miniconda dashboard on MacOSX
View 2015-08-25_test_cmake_download_from_dropbox.cmake
# To run the script:
# cmake -DDEST=/home/jcfr -P 2015-08-25_test_cmake_download_from_dropbox.cmake
set(DEST ".")
jainnitin /
Last active Aug 25, 2015 — forked from molaschi/
Integrate Stash with Slack using webhooks

This is a short article on how we integrate stash and slack

First of all i assume you have:

  • a working stash installation
  • a repository you to notify slack on pushes
  • stash user with administration priviledges
  • full access to the server (linux) where stash is installed on
  • a team configured on slack
  • slack user with administration priviledges
View user-initials.html
<title>User Initials</title>
/* Relevant Code */
.person {
display: table;
margin: 24px auto;
bgulla /
Created Aug 25, 2015
Python Webserver that serves up a flat HTML file.
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
from time import gmtime, strftime
import sys,random,socket
HOSTNAME = socket.gethostname()
if len(sys.argv) > 1:
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)))))
You can’t perform that action at this time.