Skip to content

Instantly share code, notes, and snippets.

🤔
what's a closure, anyway?

Matthew Smillie notmatt

🤔
what's a closure, anyway?
Block or report user

Report or block notmatt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bahamat
bahamat / cmon.sh
Last active Oct 11, 2019
Shell script to pull CMON metrics from Joyent Triton (https://www.joyent.com/triton)
View cmon.sh
#!/bin/bash
if [[ -n "$TRACE" ]]; then
export PS4='[\D{%FT%TZ}] ${BASH_SOURCE}:${LINENO}: ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
set -o xtrace
fi
call() {
curl "$insecure" "${header:--i}" -s --cert "$cert" --key "$key" "https://${1}/${2}"
exit $?
@AlainODea
AlainODea / hello.c
Last active Mar 16, 2016
Cross-compiler from x86_64 Linux to x86_64 Illumos on Ubuntu (works for Hello World and possibly more)
View hello.c
#include<stdio.h>
main()
{
printf("Hello World");
}
anonymous
anonymous / gist:4163741
Created Nov 28, 2012
MathBox API example
View gist:4163741
Open this page and open the JavaScript console / inspector:
http://acko.net/files/mathbox/MathBox.js/examples/ComplexExponentiation.html
Paste in these commands to manipulate the scene:
console.log(mathbox.select('surface')); // Surface primitives
console.log(mathbox.select('surface')[0].get()); // Get attributes of first surface
mathbox.set('surface', { color: 0x30a030 }); // Change color of surface(s)
@notmatt
notmatt / index.html
Created Jan 3, 2012 — forked from jasondavies/index.html
alpha-shapes aka concave hulls in d3
View index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Alpha-Shapes</title>
<script src="http://mbostock.github.com/d3/d3.min.js"></script>
<script src="http://mbostock.github.com/d3/d3.geom.min.js"></script>
<style type="text/css">
path {
@joemccann
joemccann / exbp.sh
Created Jun 1, 2011
Express Boilerplate using EJS, Stylus, jQuery and Normalize.css
View exbp.sh
# /bin/bash
# run from Express project root directory
# Dependencies: wget, express, npm
express -t ejs -c stylus
npm install ejs
npm install stylus
mv public/stylesheets public/css
mv public/javascripts/ public/js
mv public/images/ public/img
@mbostock
mbostock / .block
Last active Feb 8, 2016
d3.geo.tiler
View .block
license: gpl-3.0
View mice.css
.mouse, #preview{
position: absolute;
background-repeat: no-repeat;
height: 22px;
min-width: 15px;
z-index: 100;
}
.mouse{
background-image: url('../images/cursor.png');
You can’t perform that action at this time.