Skip to content

Instantly share code, notes, and snippets.

View jt's full-sized avatar

JT Marino jt

View GitHub Profile
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@paulnicholson
paulnicholson / powssl
Last active November 24, 2021 16:40
ssl with pow using stud

Instructions

  • Install stud $ brew install https://raw.github.com/paulnicholson/homebrew/master/Library/Formula/stud.rb
  • Download and install the powssl script $ curl https://gist.githubusercontent.com/paulnicholson/2050941/raw/7e4d2178e3733bed18fdfe737277c3cb72241d39/powssl > ~/bin/powssl $ chmod +x ~/bin/powssl
  • Run powssl to create development certificate and configure stud.
  • $ powssl
@peternixey
peternixey / securing_rails_updates.md
Created March 5, 2012 13:10
How Homakov hacked GitHub and how to protect your application by Peter Nixey

##How Homakov hacked GitHub and the line of code that could have prevented it


Please note: THIS ARTICLE IS NOT WRITTEN BY THE GITHUB TEAM or in any way associated with them. It's simply hosted as a Gist because the markdown formatting is excellent and far clearer than anything I could manage on my personal Tumblr at peternixey.com.

If you'd like to follow me on twitter my handle is @peternixey


@spadin
spadin / install-notes.md
Created August 30, 2011 03:28
Installation notes for installing nodejs, npm and redis on a fresh Ubuntu 11.04 server. Worked on Rackspace Cloud Servers.

Basic Install of Node.js from scratch on Ubuntu 11.04 Notes

$ apt-get update
$ apt-get install git-core curl build-essential openssl libssl-dev
$ git clone https://github.com/joyent/node.git && cd node
$ make
$ sudo make install
$ curl http://npmjs.org/install.sh | sudo sh

Cleanup node install files:

@shaneriley
shaneriley / gist:963024
Created May 9, 2011 18:13
jQuery Toggle Attribute Plugin
$.fn.toggleAttr = function(attr) {
return this.each(function() {
var $e = $(this);
$e.attr(attr, !!!$e.attr(attr));
});
};
@shaneriley
shaneriley / gist:938084
Created April 23, 2011 01:12
jQuery Placeholder Attribute Polyfill
if (!("placeholder" in document.createElement("input"))) {
$("input[placeholder]").each(function() {
var $e = $(this),
placeholder = $e.attr("placeholder");
$e.val(placeholder);
$e.bind("focus blur", function(e) {
if (e.type === "focus" && $e.val() === placeholder) { $e.val(""); }
else { if (!$e.val()) { $e.val(placeholder); } }
});
}).closest("form").submit(function() {
@protocool
protocool / caveatPatchor.js
Created February 14, 2011 02:29
Sample caveatPatchor.js file for use in Propane 1.1.2 and above
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
@bryanl
bryanl / campfire-emoji.txt
Created January 27, 2011 16:34
campfire emoji
Surround these with : e.g. :calling:
+1
-1
bulb
calling
clap
cop
email
feet
var isIphone = (function() {
return navigator.userAgent.match(/iPhone|iPod/i) != null;
})();
var isIpad = (function() {
return navigator.userAgent.match(/iPad/i) != null;
})();
# Hook our MongoMapper model into Solr
module MongoAdapter
class InstanceAdapter < Sunspot::Adapters::InstanceAdapter
def id
@instance.id
end
end
class DataAccessor < Sunspot::Adapters::DataAccessor
def load(id)