Skip to content

Instantly share code, notes, and snippets.

@amien8
amien8 / AlwaysMountRootFSWithNoatime_MacOSX.sh
Created December 14, 2015 08:30 — forked from pklaus/AlwaysMountRootFSWithNoatime_MacOSX.sh
SSD Optimizations of Mac OS X 10.6 Operating System
#!/bin/bash
# +----------------------------------------------------------------------+
# | |
# | Mount the root file system / with the option noatime |
# | |
# | By Philipp Klaus <http://blog.philippklaus.de> |
# | Tip found on <http://blogs.nullvision.com/?p=275> |
# | |
# +----------------------------------------------------------------------+
@amien8
amien8 / .bash_profile_windows
Created December 14, 2015 08:25 — forked from davemo/.gitconfig
bash_profile, sublime settings, alfred snippets
# snag theme: http://noahfrederick.com/blog/2011/lion-terminal-theme-peppermint/
# A two-line colored Bash prompt (PS1) with Git branch and a line decoration
# which adjusts automatically to the width of the terminal.
# Screenshot: http://img194.imageshack.us/img194/2154/twolineprompt.png
# Michal Kottman, 2012
RESET="\[\033[0m\]"
RED="\[\033[0;31m\]"
GREEN="\[\033[01;32m\]"
@amien8
amien8 / cliptextfile.sh
Created December 14, 2015 08:25 — forked from ttscoff/cliptextfile.sh
Copy the contents of any text file to the clipboard, intended for use as an OS X System Service
# A stupid script that actually makes a handy system service
# Use it to right click files and extract their text content to the clipboard
# Brett Terpstra 2013, no rights reserved
txtcount=`file "$@"|grep -c text`
response=0
msg=""
if [ $txtcount -eq $# ]; then
cat "$@"|pbcopy
if [ "$?" -ne "0" ]; then
msg="Error running command"
@amien8
amien8 / macosx_bootstrap.sh
Created December 14, 2015 08:24 — forked from fnichol/macosx_bootstrap.sh
Mac OS X 10.7/10.8/10.9 (Lion/Mountain Lion/Mavericks) Bootstrapping
#!/usr/bin/env bash
set -e
# # Mac OS X 10.7/10.8/10.9/10.10 Bootstrapping
#
# ## Pre-requisites
#
# 1. Set your hostname: In **System Preferences** go to **Sharing** and enter
# the name in **Computer Name**
# 2. Run **Software Update** and reboot if necessary
@amien8
amien8 / gist:1115eb4dede262a2646c
Created December 14, 2015 08:24 — forked from vlado/gist:1877457
Postgres on OSX Lion - Fix
# ** ERROR 1 **
# FATAL: lock file "postmaster.pid" already exists
# HINT: Is another postmaster (PID 4646) running in data directory "/usr/local/var/postgres"?
#
# ** ERROR 2 **
# Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
#
# To fix one of this errors:
cat /usr/local/var/postgres/postmaster.pid # pid is the number on first line
@amien8
amien8 / gist:c7c0afc5809a3b06a3f3
Created December 13, 2015 22:18 — forked from danro/gist:3837163
Lion / Mountain Lion font anti-aliasing tweak.
# Fix font smoothing on Lion / Mountain Lion [range: 0-3]
defaults -currentHost write -globalDomain AppleFontSmoothing -int 1
@amien8
amien8 / osx-for-hackers.sh
Created December 13, 2015 14:31 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@amien8
amien8 / .bash_profile
Created December 13, 2015 11:28 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@amien8
amien8 / .zshrc
Created December 12, 2015 09:54 — forked from aurbano/.zshrc
My .zshrc file
# start_time="$(date +%s)"
# Antigen — A zsh plugin manager
export ANTIGEN_DEFAULT_REPO_URL=https://github.com/sharat87/oh-my-zsh.git
source ~/antigen.zsh
# Load the oh-my-zsh's library.
antigen use oh-my-zsh
# Bundles from the default repo declared above.