Skip to content

Instantly share code, notes, and snippets.

#
defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock
sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/OSX --applicationpath /Applications/Install\ OS\ X\ Yosemite.app --nointeraction
#
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/
#
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
#
# Alternative to http://www.groths.org/trim-enabler-3-0-released/
# Method behind this madness described: http://forums.macrumors.com/showthread.php?t=1409151&page=4
# See discussion in comments here: https://www.macupdate.com/app/mac/39654/lion-tweaks
# And here: http://forums.macrumors.com/showthread.php?t=1410459
#!/bin/sh
echo "Running..."
PROG=$0
RSYNC="/usr/bin/rsync"
SCRIPT_MOUNTED='false'
MOUNT_VOLUME="/Volumes/Qdownload"
SRC="$MOUNT_VOLUME/transmission/completed/"
DST="/Users/tom/Dumping Ground/Qnap Downloads"
.DS_Store
.Trashes
*/.Trash
Dropbox
Google 雲端硬碟
OneDrive
@yosimasu
yosimasu / backup.sh
Last active August 29, 2015 14:14
Backup home directory through rsync in MAC Box
#!/usr/bin/env bash
START=$(date +%s)
sudo rsync -a8ESv --progress --delete --exclude-from=.rsyncignore ~ /Volumes/DATA
FINISH=$(date +%s)
echo "total time: $(( ($FINISH-$START) / 60 )) minutes, $(( ($FINISH-$START) % 60 )) seconds"
'use strict';
//npm install gulp gulp-minify-css gulp-uglify gulp-clean gulp-cleanhtml gulp-jshint gulp-strip-debug gulp-zip --save-dev
var gulp = require('gulp'),
clean = require('gulp-clean'),
cleanhtml = require('gulp-cleanhtml'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
stripdebug = require('gulp-strip-debug'),

MAC OS Applications

Command Line

  • zsh
    • chsh -s /bin/zsh
    • .zshenv
    • .zprofile
    • .zshrc
    • .zlogin
#!/usr/bin/env bash
apt-get update && apt-get install -y git curl
curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3
usermod -a -G rvm vagrant
source /usr/local/rvm/scripts/rvm
rvm rubygems latest
gem install bundler
#!/bin/sh
PROJDIR=`pwd`
PROJECT_NAME="XXXX"
PROJECT_BUILDDIR="${PROJDIR}/build/Release-iphoneos"
BUILD_HISTORY_DIR="${PROJDIR}/build/${PROJECT_NAME}.build"
CODE_SIGN_IDENTITY="iPhone Distribution: XXXX"
DEVELOPPER_NAME="iPhone Distribution: XXXX"
PROVISONNING_PROFILE="${PROJDIR}/XXXX.mobileprovision"