Skip to content

Instantly share code, notes, and snippets.

View idettman's full-sized avatar

Isaac A. Dettman idettman

View GitHub Profile
@nicerobot
nicerobot / README.md
Last active June 22, 2025 01:39
Mac OS X uninstall script for packaged install of node.js from https://stackoverflow.com/a/9287292/23056

To run this, you can try:

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
@rockpapergoat
rockpapergoat / EnCase
Created June 21, 2012 15:52
encase pkg parts
#!/bin/sh
. /etc/rc.common
StartService ()
{
ConsoleMessage "Starting EnCase Servlet"
/usr/local/sbin/enosxintel -d -p /usr/local/sbin
}
StopService ()
{
ConsoleMessage "Stopping EnCase Servlet"
@madrobby
madrobby / gist:3201472
Created July 29, 2012 19:50
Check if the browsers supports SVG
// comments welcome, there may be better ways to do this!
function supportsSVG(){
return !!('createElementNS' in document &&
document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGRect)
}
@robdodson
robdodson / inherit.js
Created August 9, 2012 18:00
inherit method
// Optimized version of classical inheritance
// Proxy constructor is stored in a closure which is
// returned from a self executing function.
var inherit = (function() {
var F = function() {};
return function(C, P) {
F.prototype = P.prototype;
C.prototype = new F();
C._super = P.prototype;
C.prototype.constructor = C;
@mikeric
mikeric / application.css
Last active December 9, 2022 03:48
Rivets.js todo list demo
.done {
opacity: 0.5;
text-decoration: line-through;
}
@BKcore
BKcore / perfnow.js
Created August 22, 2012 14:27
Performance.now() polyfill
(function(w){
var perfNow;
var perfNowNames = ['now', 'webkitNow', 'msNow', 'mozNow'];
if(!!w['performance']) for(var i = 0; i < perfNowNames.length; ++i)
{
var n = perfNowNames[i];
if(!!w['performance'][n])
{
perfNow = function(){return w['performance'][n]()};
break;
import time
from browsermobproxy import Server
server = Server('/Users/dhunt/Downloads/browsermob-proxy-2.0-beta-6/bin/browsermob-proxy')
server.start()
proxy = server.create_proxy()
from selenium import webdriver
profile = webdriver.FirefoxProfile()
profile.set_proxy(proxy.selenium_proxy())
driver = webdriver.Firefox(firefox_profile=profile)
window.addEventListener('DOMContentLoaded', function() {
//check support
if (!supportsWebGL()) {
$('webgl-canvas').innerHTML = 'Your browser doesn\'t seem to support WebGL. More info <a href=\'http://get.webgl.org/\'>here</a>.';
return;
}
//get context
var canvas = $('webgl-canvas'),
gl = getWebGLContext(canvas);
@kentbrew
kentbrew / collide-o-scope.js
Last active December 10, 2015 10:38
New-and-improved Collide-O-Scope, now with requestAnimationFrame goodness!
// new and improved collide-o-scope
(function (w, d, n, a) {
var $ = w[a.k] = {
'w': w, 'd': d, 'n': n, 'a': a, 's': {},
'f': (function () {
return {
listen : function (el, ev, fn) {
if (typeof $.w.addEventListener !== 'undefined') {
el.addEventListener(ev, fn, false);
@jareware
jareware / SCSS.md
Last active June 16, 2025 21:34
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso