Skip to content

Instantly share code, notes, and snippets.

// HOWTO: load LABjs itself dynamically!
// inline this code in your page to load LABjs itself dynamically, if you're so inclined.
(function (global, oDOC, handler) {
var head = oDOC.head || oDOC.getElementsByTagName("head");
function LABjsLoaded() {
// do cool stuff with $LAB here
}
@danott
danott / entities.css
Created January 31, 2011 22:07
Use CSS's :after pseudo-selector to insert hexadecimal values of html entities into the document. Less markup. More awesome.
/* Daniel Ott
* entities.css
* 31 January 2011
*
* Adding arrows to thinks makes them more clickable. Right?
* Use CSS's :after pseudo-selector to insert hexadecimal values
* of html entities into the document. Less markup. More awesome.
*/
.add-an-arrow:after {
@stympy
stympy / excerpt.rb
Created May 23, 2011 13:14
Jekyll excerpt plugin
# This goes in _plugins/excerpt.rb
module Jekyll
class Post
alias_method :original_to_liquid, :to_liquid
def to_liquid
original_to_liquid.deep_merge({
'excerpt' => content.match('<!--more-->') ? content.split('<!--more-->').first : nil
})
end
end
@jamiehodge
jamiehodge / Gemfile
Created January 15, 2012 22:37
Spine.js contacts demo Sinatra backend
source 'https://rubygems.org'
gem 'sinatra', git: 'git://github.com/sinatra/sinatra.git'
gem 'sequel'
gem 'sqlite3'
gem 'yajl-ruby', require: 'yajl'
@turtlesoupy
turtlesoupy / nginx.conf
Created July 8, 2012 21:16
node.js upstream nginx config
http {
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m;
proxy_temp_path /var/tmp;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_comp_level 6;
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@Glutexo
Glutexo / current-date-and-time.applescript
Created September 14, 2014 12:48
AppleScript to get current date and time (YYYY-MM-DD HH:MM:SS). Usable as a Text Service in Mac OS X.
(*
The zero_pad function taken from:
http://www.nineboxes.net/2009/10/an-applescript-function-to-zero-pad-integers/
*)
on zero_pad(value, string_length)
set string_zeroes to ""
set digits_to_pad to string_length - (length of (value as string))
if digits_to_pad > 0 then
repeat digits_to_pad times
set string_zeroes to string_zeroes & "0" as string
{"data":[{"id":"1432750582849","json":"{\"enabled\":true,\"name\":\"Twitter: Hide Trends\",\"url\":\"\",\"updateUrl\":\"\",\"sections\":[{\"code\":\".module.trends { display: none; }\",\"domains\":[\"twitter.com\"],\"regexps\":[],\"urlPrefixes\":[],\"urls\":[\"\"]}]}"},{"id":"1432750082921","json":"{\"enabled\":true,\"name\":\"Twitter: Hide Promoted Tweets\",\"url\":\"\",\"updateUrl\":\"\",\"sections\":[{\"code\":\"*[data-promoted] { display:none; }\",\"domains\":[\"twitter.com\"],\"regexps\":[],\"urlPrefixes\":[],\"urls\":[\"\"]}]}"},{"id":"1432750240677","json":"{\"enabled\":true,\"name\":\"Twitter: Hide Who to Follow\",\"url\":\"\",\"updateUrl\":\"\",\"sections\":[{\"code\":\".wtf-module,\\n.WhoToFollow {\\n\\tdisplay: none !important;\\n}\",\"domains\":[\"twitter.com\"],\"regexps\":[],\"urlPrefixes\":[],\"urls\":[\"\"]}]}"},{"id":"1432750414498","json":"{\"enabled\":true,\"name\":\"Twitter: Hide Footer\",\"url\":\"\",\"updateUrl\":\"\",\"sections\":[{\"code\":\".Footer { display: none }\",\"domains\":[\"t
#pagelet_trending_tags_and_topics,
#pagelet_ego_pane,
.rhcFooterWrap {
display: none !important;
}
[data-reactid*="$interestsNav"],
[data-reactid*="$developerNav"],
[data-reactid*="$pagesNav"],
[data-reactid*="$listsNav"],
[data-reactid*="$eventsNav"],