Skip to content

Instantly share code, notes, and snippets.

View jbenner-radham's full-sized avatar

James Benner jbenner-radham

View GitHub Profile
@bogomil
bogomil / jpbutton.js
Created May 13, 2011 07:12
Mozilla JetPack example - create a button on page
var buttonScript = [
'var butt = document.createElement("button");', //define button element
'var btext = document.createTextNode("Click me");', //define the text
'butt.appendChild(btext);', //attach text to the button
'butt.addEventListener("click", function(){document.bgColor="red"} , false)', //handle onclick event
'document.getElementById("test").appendChild(butt);', //put the button on the page
];
@xee5ch
xee5ch / DriverImport.bat
Created June 12, 2011 13:34
Recursively Check Folders for INF Files and Install Windows 7 PnP Drivers When Found
@ECHO OFF
IF "%1" == "" GOTO ERROR
ECHO.
ECHO Checking dir %1 recursively for drivers.
ECHO.
FOR /F "tokens=*" %%D IN ('DIR /B /AD /S %1') DO PNPUTIL -a "%%D\*.inf" 2>&1 >> %WinDir%\system32\driverimport.log
@nicolas-grekas
nicolas-grekas / Advanced-HTTP-en.md
Created June 15, 2011 22:03
Advanced handling of HTTP requests in PHP
@aronwoost
aronwoost / README.md
Created July 25, 2011 19:48
Build auto-deploy with php and git(hub) on an EC2 Amazon AMI instance

Kind of continue from the other gist how to install LAMP on an Amazon AMI

##Install git

sudo yum install git-core

##Create ssh directory since it doesn't exists by default on the Amazon AMI

@nuxlli
nuxlli / sublime_text_2_useful_shortcuts.md
Created September 9, 2011 18:51 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
@paulirish
paulirish / data-markdown.user.js
Last active June 27, 2025 05:29
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
@jed
jed / sync.js
Created November 23, 2011 15:24
turn an async function sync
// Usage:
// function asyncAdd(a, b, cb){ cb(a + b ) }
//
// var syncAdd = sync(asyncAdd)
// , sum = syncAdd(2, 2)
//
// assert(sum == 4)
//
// NOTE:
// this only works for functions that execute their callback before returning.
@ewilderj
ewilderj / gist:1552777
Created January 3, 2012 00:22
Add dependency to DOAP
=== modified file doap/schema/doap.rdf
--- doap/schema/doap.rdf 2009-06-25 16:32:08 +0000
+++ doap/schema/doap.rdf 2010-07-30 14:41:53 +0000
@@ -390,6 +390,19 @@
<rdfs:domain rdf:resource="http://usefulinc.com/ns/doap#Project" />
</rdf:Property>
+<rdf:Property rdf:about="http://usefulinc.com/ns/doap#dependency">
+ <rdfs:isDefinedBy rdf:resource="http://usefulinc.com/ns/doap#" />
+ <rdfs:label xml:lang="en">dependency</rdfs:label>
@michaelcontento
michaelcontento / lxc-ubuntu.sh
Created January 3, 2012 20:45 — forked from dkulchenko/lxc-ubuntu
Script to generate LXC containers for EC2
#!/bin/bash
#
# Template script for generating ubuntu container for LXC with the same
# ubuntu relase as the host
#
# This script is based on lxc-debian for EC2 (Daniil Kulchenko <[email protected]>)
# wich itself is based on lxc-debian (Daniel Lezcano <[email protected]>)
#
@saetia
saetia / gist:1623487
Last active June 4, 2025 08:26
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat