Skip to content

Instantly share code, notes, and snippets.

View fakemelvynkim's full-sized avatar

melvyn fakemelvynkim

  • Santa Monica, CA
View GitHub Profile
brew update &&
# parsers
brew install npm &&
brew install node &&
brew install ruby &&
brew install go &&
brew install python3 &&
# parsers - java
brew tap caskroom/cask &&
@fakemelvynkim
fakemelvynkim / session-wide.md
Created June 3, 2014 22:11
loading persistent environment variables in Ubuntu

assignment expressions, one per line

~/.pam_environment
# FOO=bar
# PATH DEFAULT=${PATH}:${HOME}/MyPrograms

NOTE:

  1. You may not quote the value when doing a simple variable assignment like the FOO=bar example.

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

# replace tabs with 4 spaces in .m and .h files
find . -name "*.[mh]" | while read line; do expand -t 4 $line > $line.new; mv $line.new $line; done
find . -name "*.[mh]" | while read line; do git stripspace < $line > $line.new; mv $line.new $line; done
@fakemelvynkim
fakemelvynkim / tar_examples.md
Last active September 24, 2021 14:04
tar examples

Tar Command Examples

options

-c  create
-x  extract
-v  verbose mode
-f  filename
-t  view content of archive file.
-j  bzip2

-z gzip

@fakemelvynkim
fakemelvynkim / advance_commands.vim
Created March 14, 2014 11:51
advanced vim commands to review
da< (or) da( (or) da{ // delete the block including <,(,{ and >,),} rsply
di< (or) di( (or) di{ // simillarly, but excluing <,(,{ and >,),} rsply
yi< (or) yi( (or) yi{ // yanks simillarly. Simillarly for ciw, viw, etc
df<Space> // delete from current char including the next space
daw // delete current word including the next space
diq // delete current word excluding the next space
yiw // yank current word excluding the next space
yaw // yank current word including the next space
@fakemelvynkim
fakemelvynkim / rsync_partial_progress.sh
Created March 11, 2014 08:25
rsync partial progress to remote server
#!/bin/sh
#
# rsync partial progress to remote server
#
# edit the following variables
REMOTE_HOST_USERNAME=""
REMOTE_HOST_SERVER_ADDRESS=""
REMOTE_HOST_FILEPATH=""
# execution script
'/^([a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4})*$/'
@fakemelvynkim
fakemelvynkim / cribbs.bash
Created March 11, 2014 08:17
CRIBBS -- Cron Rsync Incremental Backup Bash Script
#!/bin/bash
#######################################################
# CRIBBS -- Cron Rsync Incremental Backup Bash Script #
# AUTHOR: Adam Merrifield <http://adam.merrifield.ca> #
# (and countless sources from the web) #
# DATE: 05-26-11 23:17 #
# VERSION: 1.0.0 #
#######################################################
@fakemelvynkim
fakemelvynkim / edit_apple_launchd.sh
Created March 11, 2014 06:33
Editing launchd in two ways
#!/bin/sh
#
# FIRST
#
# To load what's loading via launchd
launchctl list
# To kill and remove process from the list,
# launchctl remove name.of.process
#