Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
#
# Suggested name for this script: git-clean-stale-branches
#
# This script will help to remove "stale" branches from a remote
# repository (by default the "origin" repository). Stale branches
# are any branches that does not exist in the local repository.
#
# This script should be run in the local repository. It will print
# out a git command to remove all branches from the remote repository
@ericelliott
ericelliott / args.js
Created June 24, 2011 08:05
Polymorphic functions and multiple dispatch in JavaScript
var args = [].slice.call(arguments, 0);
@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@paulmars
paulmars / gist:6528004
Created September 11, 2013 18:45
ssh back to my mac
# cribed from this post
# http://onethingwell.org/post/27835796928/remote-ssh-bact-to-my-mac
dns-sd -E # gets your member id for icloud
# SSH command
ssh -2 -6 [USERNAME]@[COMPUTER NAME].[account number].members.btmm.icloud.com
# ~/.ssh/config
Host mac-remote
@cirocosta
cirocosta / iframe.html
Last active January 6, 2024 23:02
Sending messages from child iframe to parent webpage
<!DOCTYPE html>
<html>
<head>
<title>My Iframe</title>
</head>
<body>
<button>Botão</button>
<script type="text/javascript">
@nelsonomuto
nelsonomuto / Isotope - packery layout mode.markdown
Created July 3, 2015 12:05
Isotope - packery layout mode
@nelsonomuto
nelsonomuto / Isotope - masonry layout mode.markdown
Created July 3, 2015 12:13
Isotope - masonry layout mode
@abhiaiyer91
abhiaiyer91 / reduxSelectorPattern.md
Last active July 7, 2024 13:03
Redux Selector Pattern

Redux Selector Pattern

Imagine we have a reducer to control a list of items:

function listOfItems(state: Array<Object> = [], action: Object = {}): Array<Object> {
  switch(action.type) {
    case 'SHOW_ALL_ITEMS':
      return action.data.items
    default:
@yoanisgil
yoanisgil / docker-compose.yml
Last active January 23, 2021 13:55
Rancher SSL with compose
version: '2'
services:
rancher:
image: rancher/server
container_name: rancher-server
restart: always
nginx:
image: nginx:1.11
volumes: