Skip to content

Instantly share code, notes, and snippets.

@nmrugg
nmrugg / README.md
Created August 9, 2022 16:18
image-pixelated doesn't work in many contexts
@nmrugg
nmrugg / git_push_slow.js
Created January 18, 2014 08:14
Push all necessary commits one at a time. This is particularly useful when pushing a large number of commits on a flaky connection.
/// Push all necessary commits one at a time.
///
/// This is particularly useful when pushing a large number of commits on a flaky connection.
///
/// Usage: node git_push_slow.js [how_many_commits [branch_to_push]]
/// NOTE: By leaving off both params or setting the first to -1, it will try to determine how many commits behind the origin is.
/// TODO: Show upload progress.
///
/// License: MIT
///
@nmrugg
nmrugg / fiddle.css
Created October 19, 2011 07:12
Yoshi_Fiddle
#background1 {
background-image: url(http://i52.tinypic.com/293kp50.gif);
left:0px;
width: 512px;
height: 317px;
position:absolute;
}
#background2 {
@nmrugg
nmrugg / dynamic_server.js
Created March 16, 2011 06:26
A simple Node HTTP server that executes JavaScript files and displays the results
/*jslint onevar: true, undef: true, newcap: true, nomen: true, regexp: true, plusplus: true, bitwise: true, node: true, indent: 4, white: false */
/// Usage: node dynamic_server.js PORT
var fs = require("fs"),
http = require("http"),
path = require("path"),
spawn = require('child_process').spawn,
url = require("url"),
qs = require('querystring'),
@nmrugg
nmrugg / static_server.js
Last active September 25, 2015 00:27
A simple node.js web server
/*jslint onevar: true, undef: true, newcap: true, nomen: true, regexp: true, plusplus: true, bitwise: true, node: true, indent: 4, white: false */
/// Usage: node static_server.js PORT
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs"),
qs = require("querystring"),
port = process.argv[2] || 80, /// Defaults to port 80