- Make sure you have yo installed:
npm install -g yo
- Run:
yo webapp
- Install grunt-contrib-jade:
npm install grunt-contrib-jade --save-dev
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Will produce 'x is at y' posts | |
FB.api('/me/feed', 'post', { | |
access_token: "", | |
place: "page_id" | |
}, cb); | |
// Will create 'x shared a link - at y' | |
FB.api('/me/feed', 'post', { | |
access_token: "", | |
place: "page_id", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
//npm install gulp gulp-minify-css gulp-uglify gulp-clean gulp-cleanhtml gulp-jshint gulp-strip-debug gulp-zip --save-dev | |
var gulp = require('gulp'), | |
clean = require('gulp-clean'), | |
cleanhtml = require('gulp-cleanhtml'), | |
minifycss = require('gulp-minify-css'), | |
jshint = require('gulp-jshint'), | |
stripdebug = require('gulp-strip-debug'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.6) | |
// Compass (v1.0.1) | |
// ---- | |
// list | |
// $colours: (red green blue purple); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Modules extend a generic queueable module, and add themselves to a global | |
// queue, which manages running them synchronously, as soon as it can (on the next tick). | |
// Running order is based on 'high', 'medium' and 'low' priorities, which modules | |
// can assign themselves. | |
// The queue also measures how long modules take to run, and if a module exceeds 10ms | |
// the queue sends a warning (probably to sentry IRL). | |
// The log() calls work best with chrome devtools, rather than the repl one | |
// QUEUE TO HANDLE REGISTRATION AND RUNNING OF MODULES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<script> | |
(function(Document) { | |
Document.prototype.write = function(s) { | |
var allScripts = document.getElementsByTagName('script'), | |
thisScript = allScripts[allScripts.length-1]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
(function (window, Window) { | |
var eventTypes = ['scroll', 'mousemove', 'touchmove'], | |
eventTypesRegex = new RegExp(eventTypes.join("|")); | |
eventTypes.forEach(function (type) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.26HKGE { -moz-box-sizing: content-box; } | |
.1K1vKh { -moz-osx-font-smoothing: grayscale; } | |
.1qXBy7 { -moz-transform: scale( 0.99999 ); } | |
.Z11Czbh { -ms-text-size-adjust: 100%; } | |
.2z9ye { -webkit-appearance: button; } | |
.25whma { -webkit-appearance: none; } | |
.Vf0dE { -webkit-appearance: textfield; } | |
.Z11mPm0 { -webkit-box-orient: vertical; } | |
.Z23SxXi { -webkit-box-sizing: content-box; } | |
.c6tBr { -webkit-font-feature-settings: 'kern' 1; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This has moved: | |
https://github.com/guardian/frontend/wiki/Browsers-on-theguardian.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This will run `nvm use` everytime you change directory, if | |
# 1. an .nvmrc file is present | |
# 2. there is no .nvmrc but you're not using your default node | |
# Add it to your `.bash_profile` (or wherever else is suitable for your setup). | |
enter_directory(){ | |
if [ "$PWD" != "$PREV_PWD" ]; then | |
PREV_PWD="$PWD"; | |
if [ -e ".nvmrc" ]; then | |
nvm use; |
OlderNewer