Skip to content

Instantly share code, notes, and snippets.

View danielgwood's full-sized avatar

Daniel Wood danielgwood

View GitHub Profile
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@marcoslhc
marcoslhc / gist:3909289
Created October 18, 2012 01:05
Using node.js in webfaction
#taken from //community.webfaction.com/questions/4888/install-nodejs-with-express-framework
#the "forever" part taken from //shkfon.tumblr.com/post/27178918675/real-world-nodejs-part-1
#thanks to [Ryan s](http://community.webfaction.com/users/16/ryans/) and [Dave Stevens](http://shkfon.tumblr.com/)
mkdir -p $HOME/src
cd $HOME/src
wget 'http://nodejs.org/dist/v0.8.9/node-v0.8.9.tar.gz'
tar -xzf node-v0.8.9.tar.gz
cd node-v0.8.9
@lukemartin
lukemartin / kittify bookmarklet
Last active October 13, 2015 22:58
Need cats? Have kittify.
/* Highlight everything below, drag to bookmarks bar */
javascript:(function(b){var a=b.getElementsByTagName("img"),f=a.length,d,c,e;for(d=0;d<f;d++){a[d].src="http://placekitten.com/"+a[d].width+"/"+a[d].height;}})(document);
@adamloving
adamloving / temporary-email-address-domains
Last active May 31, 2024 15:43
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com
@ericelliott
ericelliott / essential-javascript-links.md
Last active July 18, 2024 15:03
Essential JavaScript Links
@paulirish
paulirish / bling.js
Last active July 3, 2024 20:45
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@paulirish
paulirish / what-forces-layout.md
Last active July 18, 2024 22:41
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@bomberstudios
bomberstudios / sketch-diff-in-git.md
Last active May 17, 2024 02:53
How to diff your .sketch files in Git

Using sketchtool to diff your .sketch files using text

Requirements

You need to have SketchTool installed somewhere in your path.

Setup

Add this in your ~/.gitconfig file (for some reason, it won't work in a local .gitconfig file):

@daveio
daveio / simon-sweeney-letter.md
Last active February 23, 2016 10:03
What has the EU ever done for us?

This letter was originally published by [Guardian Letters][0], and has been reformatted for clarity and ease of reading. Other than minor punctuation and significant layout changes, it is presented verbatim.

At last we may get a debate on Britain's relationship with Europe ([Leader][1], 11 January). What did the EEC/EU ever do for us? Not much, apart from:

  • Providing 57% of our trade.
  • Structural funding to areas hit by industrial decline.
  • Clean beaches and rivers.
  • Cleaner air.
  • Lead free petrol.
  • Restrictions on landfill dumping.