Skip to content

Instantly share code, notes, and snippets.

@mjuhl
mjuhl / readable.js
Last active September 27, 2015 04:38
Readable bookmarklet
javascript:(function(){_readableOptions={'text_font':'Source Sans Pro, Avenir Next','text_font_monospace':'source code pro, inconsolata','text_font_header':'source sans pro, Avenir Next Condensed','text_size':'18px','text_line_height':'1.618','box_width':'30em','color_text':'#444','color_background':'#F9F9F9','color_links':'#1F7BB6','text_align':'normal','base':'blueprint','custom_css':'h1,h2,h3,h4,h5,h6 { font-weight: 700; font-family: open sans condensed, avenir next condensed; open sans condensed; color: #333; text-transform: uppercase; }code, pre { background: #eee; color: #626262; font-size: 11.125px; }pre {overflow: auto; padding: 11.125px; }::selection { background: #edefef; }blockquote {font-style: normal;border-left: 6px solid #f0f0f0;color: #777;font-weight: 300;}'};if(document.getElementsByTagName('body').length>0);else{return;}if(window.$readable){if(window.$readable.bookmarkletTimer){return;}}else{window.$readable={};}window.$readable.bookmarkletTimer=true;window.$readable.options=_readableOpti
@necolas
necolas / README.md
Last active March 28, 2024 20:34
Experimenting with component-based HTML/CSS naming and patterns

NOTE I now use the conventions detailed in the SUIT framework

Template Components

Used to provide structural templates.

Pattern

t-template-name
@idan
idan / Default (OSX).sublime-keymap
Created October 27, 2011 17:51
Sublime Text asymmetric layout - place files in Packages/User
[
{
"keys": ["super+alt+shift+5"],
"command": "set_layout",
"caption" : "1-2 Grid",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells":
@elidupuis
elidupuis / handlebars-helpers.js
Last active December 7, 2021 02:24
Simple Handlebars.js helpers
/*! ******************************
Handlebars helpers
*******************************/
// debug helper
// usage: {{debug}} or {{debug someValue}}
// from: @commondream (http://thinkvitamin.com/code/handlebars-js-part-3-tips-and-tricks/)
Handlebars.registerHelper("debug", function(optionalValue) {
console.log("Current Context");
console.log("====================");
@svnlto
svnlto / install.md
Created December 12, 2011 22:59
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, nvm

Setup new Mac with OSX Lion from scratch

These commands are good as of 2011-07-27.

Install Xcode 4

The download/install takes a while so start it first. When it finishes downloading you will still need to run it to complete installation.

Really the nicest choice for a terminal on OSX right now, especially with Lion style full screen support.

@PhirePhly
PhirePhly / morningreport.sh
Created January 15, 2012 06:16
A simple example of how to use cron and bash to generate prowl notifications
#!/bin/sh
# Kenneth Finnegan, 2012
# kennethfinnegan.blogspot.com
# Posts growl notifications to iOS device using prowl & curl
#
# To have run by cron at 8:30 daily, add the following to your crontab
# 30 8 * * * /mnt/storage/scripts/morningreport.sh
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@tmaiaroto
tmaiaroto / System.php
Created February 21, 2012 16:29
A model class to help you work with some more advanced features of MongoDB using the Lithium PHP framework.
<?php
/**
* A System model to work with MongoDB from a higher level.
* This model will executes various commands as well as store new commands.
* The system.js collection is used.
*
* Warning: There be dragons in here.
*
*/
namespace app\models;
@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


@eddarmitage
eddarmitage / InstallingGitUsingYum.md
Created March 8, 2012 14:03
Installing git on CentOS 5 using yum

Installing git on CentOS 5 using yum

Since you're using CentOS 5, the default package manager is yum, not apt-get. To install a program using it, you'd normally use the following command:

$ sudo yum install <packagename>

However, when trying to install git this way, you'll encounter the following error on CentOS 5: