Skip to content

Instantly share code, notes, and snippets.

@lxneng
lxneng / gist:741932
Created December 15, 2010 13:21
install PostgreSQL 9 in Mac OSX via Homebrew
install PostgreSQL 9 in Mac OSX via Homebrew
Mac OS X Snow Leopard
System Version: Mac OS X 10.6.5
Kernel Version: Darwin 10.5.0
Install notes for PostgreSQL 9.0.1 install using Homebrew:
sh-3.2# brew install postgresql
@gre
gre / easing.js
Last active April 30, 2024 04:58
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@karlhorky
karlhorky / grayscale-disable.css
Created August 26, 2012 12:17
Cross-Browser CSS Grayscale
img.grayscale.disabled {
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'1 0 0 0 0, 0 1 0 0 0, 0 0 1 0 0, 0 0 0 1 0\'/></filter></svg>#grayscale");
-webkit-filter: grayscale(0%);
}
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active April 30, 2024 04:42
A badass list of frontend development resources I collected over time.
;; Set up slime-js
;;
;; To install, see https://github.com/swank-js/swank-js/wiki/Installation
;;
;; This is what I did:
;;
;; npm install swank-js -g
;; M-x package-install slime-js
;;
;; The slime-js version in marmalade requires swank 2010.04.04, or at least
@coderberry
coderberry / chrome-cheat-sheet.md
Last active March 10, 2023 13:56
Chrome Canary Console Cheat Sheet
@branneman
branneman / better-nodejs-require-paths.md
Last active April 27, 2024 04:16
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

import java.util.Arrays;
public class MakeChange
{
// Returns the count of all possible ways to make exact change for the
// given total using the coin denominations in the coins[] array.
//
// Each coin can be used more than once, but the order of the coins is
// irrelevant (in other words, "1, 1, 2" and "1, 2, 1" count as a
// single possibility.)
import java.util.Arrays;
public class MakeChange
{
// Returns the count of all possible ways to make exact change for the
// given total using the coin denominations in the coins[] array.
//
// Each coin can be used more than once, but the order of the coins is
// irrelevant (in other words, "1, 1, 2" and "1, 2, 1" count as a
// single possibility.)
@pesterhazy
pesterhazy / git-ag
Created March 1, 2014 17:55
Search your git repository using ag (the silver searcher)
#!/bin/bash
# Put additional ignore patterns (one by line) in .grepignore
#
git-ag () {
if [[ "$1" = "-a" ]]
then
all=1
shift