Skip to content

Instantly share code, notes, and snippets.

isaacs / comma-first-var.js
Created Apr 6, 2010
A better coding convention for lists and object literals in JavaScript
View comma-first-var.js
// See comments below.
// This code sample and justification brought to you by
// Isaac Z. Schlueter, aka isaacs
// standard style
var a = "ape",
b = "bat",
c = "cat",
d = "dog",
paulnicholson / powssl
Last active Apr 8, 2021
ssl with pow using stud
View powssl


  • Install stud $ brew install
  • Download and install the powssl script $ curl > ~/bin/powssl $ chmod +x ~/bin/powssl
  • Run powssl to create development certificate and configure stud.
    • $ powssl
View gist:4601852

#CSS FTW My way to face the challenge: Maintainable + Efficient + Optimized


  • YSlow + Page Speed (Performance Rules)…
  • CSSLint Rules…
  • Don’t use too many web fonts talk to your designer, and explain the impact of loading many sources.


View gist:5052882
* __ __ _ _ ___ _
* \ \/ _\ /\/\ (_)_ __ | |_ _ _ / __\ __ ___ ___| |__
* \ \ \ / \| | '_ \| __| | | | / _\| '__/ _ \/ __| '_ \
* /\_/ /\ \ / /\/\ \ | | | | |_| |_| | / / | | | __/\__ \ | | |
* \___/\__/ \/ \/_|_| |_|\__|\__, | \/ |_| \___||___/_| |_|
* |___/
* Identifying and Eliminating Code Smells
igrigorik / drive-appscript.js
Last active May 2, 2020
Sample BigQuery queries for the HTTP Archive dataset.
View drive-appscript.js
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var menuEntries = [ {name: "Run Query", functionName: "runQuery"} ];
ss.addMenu("HTTP Archive + BigQuery", menuEntries);
function runQuery() {
var projectNumber = 'httparchive';
var sheet = SpreadsheetApp.getActiveSheet();
vitorbritto /
Last active Dec 20, 2015
Teste para projetos responsivos - Método para capturar telas utilizando o PhantomJS.

Teste para projetos responsivos


Testar/verificar a disposição dos elementos de uma determinada página em determinadas resoluções de tela.


Executar captura de telas de acordo com os viewports definidos em um script, com a ajuda do PhantomJS.

Necessário ter o NodeJS instalado.


Setup Mac OS X

I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.

I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...


Earlier, amidst many other tweets about a new css preprocessor, Myth, I tweeted "Avoid snake oil, people. It takes more than a pretty website and a good marketing message. You have to actually deliver code that works." to which @necolas replied "assume your peers have good intentions".

Absolutely. This is sound life advice. I endeavor to do this and the message I wanted to convey to everyone today could have been conveyed without resorting to using such negative phrases as "snake oil". So to the guys at and especially to Ian Storm Taylor, I'd like to say I'm sorry. I was frustrated, but that doesn't excuse that tweet.

I'd like to talk briefly about why I was so frustrated.

Even people with great intentions can still do harm. Recently a nice guy decided he would give away a thousand dollars by ["making it rain" dollars at a mall](



When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
dahjelle /
Created Jul 13, 2016
Pre-commit hook for eslint, linting *only* staged changes.
for file in $(git diff --cached --name-only | grep -E '\.(js|jsx)$')
git show ":$file" | node_modules/.bin/eslint --stdin --stdin-filename "$file" # we only want to lint the staged changes, not any un-staged changes
if [ $? -ne 0 ]; then
echo "ESLint failed on staged file '$file'. Please check your code and try again. You can run ESLint manually via npm run eslint."
exit 1 # exit with failure status