Skip to content

Instantly share code, notes, and snippets.

View izolate's full-sized avatar

Yosh izolate

View GitHub Profile
@popravich
popravich / PostgreSQL_index_naming.rst
Last active January 6, 2025 08:57
PostgreSQL index naming convention to remember

The standard names for indexes in PostgreSQL are:

{tablename}_{columnname(s)}_{suffix}

where the suffix is one of the following:

  • pkey for a Primary Key constraint;
  • key for a Unique constraint;
  • excl for an Exclusion constraint;
  • idx for any other kind of index;
@blaja
blaja / .js
Created August 5, 2015 10:35
Get for..of loop on NodeList interface in Chrome
NodeList.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];
@izolate
izolate / install-iojs-in-10s.sh
Last active September 15, 2015 02:05
Install io.js on Ubuntu in 10 seconds (no nvm)
IOJS_VERSION=v0.0.0
IOJS_DIR=$HOME/.iojs
iojs_install() {
iojs_setup
iojs_download
iojs_assemble
iojs_teardown
}
@chrismdp
chrismdp / s3.sh
Last active January 23, 2025 09:26
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@paulirish
paulirish / bling.js
Last active February 18, 2025 14:08
bling dot js
/* bling.js */
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); };
NodeList.prototype.__proto__ = Array.prototype;
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); };
@brianblakely
brianblakely / es6_eli5.txt
Last active August 27, 2021 16:22
ES6 ELI5
Foreword
===
These short descriptions will familiarize you with new things in ES6,
quickly and simply.
A lot of details are ignored to aid this purpose. This content is only intended
as a starting point or brief refresher.
Most of the descriptions use pre-ES6 JavaScript as a frame of reference.
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active February 20, 2025 07:58
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@staltz
staltz / introrx.md
Last active March 9, 2025 05:06
The introduction to Reactive Programming you've been missing
@dandean
dandean / private-npmjs-registry.md
Last active February 5, 2025 05:47
How I got the npmjs.org registry running on my mac.

Install CouchDB (1.5)

$ brew install couchdb

It may throw an exception while compiling erlang. If so, you need to install a different gcc, reinstall erlang, then try the couchdb install again:

$ brew install apple-gcc42
$ brew reinstall -v --use-gcc erlang
function whichTransitionEvent(){
var t;
var el = document.createElement('fakeelement');
var transitions = {
'transition':'transitionend',
'MSTransition':'msTransitionEnd',
'MozTransition':'transitionend',
'WebkitTransition':'webkitTransitionEnd'
}