Skip to content

Instantly share code, notes, and snippets.

@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

…………………………

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
@mattdesl
mattdesl / gist:10218005
Created April 9, 2014 01:45
pseudo-code for perlin-noise based generative impressionist paintings
render
for each particle
x, y = particle.position
color = sample( colorMap, x, y )
noise = sample( noiseMap, x, y )
angle = noise * PI * 2
particle.velocity.add( cos(angle), sin(angle) )
@pabigot
pabigot / rotate.cc
Created November 19, 2013 18:52
C++11 template function to perform integer rotations without invoking undefined behavior. See http://blog.regehr.org/archives/1063
/* See http://blog.regehr.org/archives/1063
*/
#include <type_traits>
#include <cstdint>
#include <limits>
#include <typeinfo>
#ifndef ARGTYPE
#define ARGTYPE uint32_t
#endif /* ARGTYPE */
@malarkey
malarkey / Three Wise Monkeys.md
Created December 2, 2012 14:26
Three Wise Monkeys (NDA)

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

@jonhoo
jonhoo / README.md
Last active July 19, 2021 10:49
Distributed RWMutex in Go
@ktoso
ktoso / gist:708972
Created November 21, 2010 18:09
eclipse formatter pre-commit hook
#!/bin/sh
#
# This hook will run the eclipse code formatter before any commit
# to make the source look as it's supposed to look like in the repo.
ECLIPSE_HOME=$HOME/eclipse
STYLE_FILE=$HOME/org.eclipse.jdt.core.prefs
echo "Running pre-commit hook: run-eclipse-formatter---------------------"
echo "Will run eclipse formatter, using: $STYLE_FILE"
echo "Listing folders to run formatter on… "
@ecin
ecin / goarena.go
Created August 31, 2012 17:34
Dtrace probes in your Golang code
package main
/*
Ping vs Pong: A Gladiatorial Match
Two goroutines enter, only one leaves...
*/
/*
#cgo LDFLAGS: -lprobes -L/usr/local/lib
#include "probes.h"