Skip to content

Instantly share code, notes, and snippets.

@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@henrik
henrik / gist:3181718
Created July 26, 2012 12:15
Fix "unsupported new OS, trying as if it were 10.6-10.7" from reattach-to-user-namespace on Mountain Lion (probably in tmux).
# Start by checking if they fixed it upstream:
brew update
brew upgrade reattach-to-user-namespace
# If it says it's already installed, they haven't fixed it upstream. So do this:
# Edit the recipe:
brew edit reattach-to-user-namespace
@jessepeterson
jessepeterson / remove_ilife_dvd.sh
Created May 23, 2013 03:10
Remove iLife '11 (DVD installer)
#!/bin/sh
# Remove *all* components of iLife '11 as installed by the "DVD" installer
rm -rf \
"/Applications/iWeb.app" \
"/Library/Audio/Apple Loops/Apple/iLife Sound Effects" \
"/Applications/GarageBand.app" \
"/Library/Audio/Apple Loops/Apple/Apple Loops for GarageBand" \
"/Applications/iDVD.app" \
@gmccreight
gmccreight / master.vim
Last active June 19, 2024 15:30
A script that gives you a playground for mastering vim
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)
@olivierlacan
olivierlacan / migrate_postgresql_database.md
Last active March 24, 2022 20:30
How to migrate a Homebrew-installed PostgreSQL database to a new major version (9.3 to 9.4) on OS X. See upgraded version of this guide: http://olivierlacan.com/posts/migrating-homebrew-postgres-to-a-new-version/

This guide assumes that you recently run brew upgrade postgresql and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.

First let's check something.

brew info postgresql

The top of what gets printed as a result is the most important:

@epsilonhalbe
epsilonhalbe / haskell-prompt-info.zsh
Last active June 18, 2017 20:57
haskell-prompt-info (zsh)
function haskell_info() {
cabal_files=(*.cabal(N))
if [ $#cabal_files -gt 0 ]; then
if [ -f cabal.sandbox.config ]; then
cabal_sandbox_info
elif [ -f stack.yaml ]; then
stack_info
else
echo "%{$fg[red]%}no stack/sandbox%{$reset_color%}"
fi
@arulprasad
arulprasad / gen_md5.html
Created November 30, 2015 20:11
generate md5 for a file using CryptoJS
<html>
<head>
<title>Get MD5 for a file</title>
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js"></script>
<script type="text/javascript">
function onFileSelect(){
var reader = new FileReader();
@cartazio
cartazio / ghc-8.0-mac-build-steps.md
Last active July 5, 2019 04:26
ghc build directions

directions to do a release quality build of GHC == 8.0.* with the Make based build system with all the docs

context: this is a draft for planned edits / cleanups to the current mac build directions

getting setup

  1. have apple command line tools installed, as well as mactex, and your favorite OS X package manager (which for the rest of these directions we assume is brew)

  2. since we assume we're using brew, install it!

@SkylerLipthay
SkylerLipthay / LICENSE.txt
Last active May 29, 2024 10:55
Prevent self-referential foreign key cycles in PostgreSQL
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@chris-martin
chris-martin / nixos-from-ubuntu.md
Last active February 17, 2024 18:17
How to install NixOS from an Ubuntu liveCD