Skip to content

Instantly share code, notes, and snippets.

@windyinsc
windyinsc / gist:4b3607511b738f1a5b31
Last active September 12, 2015 05:17 — forked from dedy-purwanto/gist:11312110
Bulk remove iTerm2 color schemes.
# There was a day where I have too many color schemes in iTerm2 and I want to remove them all.
# iTerm2 doesn't have "bulk remove" and it was literally painful to delete them one-by-one.
# iTerm2 save it's preference in ~/Library/Preferences/com.googlecode.iterm2.plist in a binary format
# What you need to do is basically copy that somewhere, convert to xml and remove color schemes in the xml files.
$ cd /tmp/
$ cp ~/Library/Preferences/com.googlecode.iterm2.plist .
$ plutil -convert xml1 com.googlecode.iterm2.plist
$ vi com.googlecode.iterm2.plist
@windyinsc
windyinsc / 0_reuse_code.js
Created October 12, 2013 01:34
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="HandheldFriendly" content="true"/>
@windyinsc
windyinsc / node-and-npm-in-30-seconds.sh
Created March 7, 2016 01:36 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@windyinsc
windyinsc / bash-cheatsheet.sh
Created March 6, 2016 21:29 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@windyinsc
windyinsc / README.rst
Created June 19, 2016 10:16 — forked from dupuy/README.rst
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

@windyinsc
windyinsc / cask_upgrade.sh
Created August 6, 2016 00:35
Script upgrading outdated brew casks
#!/usr/bin/env bash
(set -x; brew update;)
(set -x; brew cask update;)
(set -x; brew cleanup;)
(set -x; brew cask cleanup;)
red=`tput setaf 1`
green=`tput setaf 2`
@windyinsc
windyinsc / iPadAir-USB-repair.md
Last active October 23, 2016 09:24
Troubleshooting Ideas for Mom's rMBP. Issue at hand: iPad Air > USB > iTunes "On & Off" Connectivity Issues to iTunes (entire MacBook Pro).

Troubleshooting Mom's iPad Air & iTunes Issue

😠 Current Issue 😡

When connecting any apple provided USB (all ports affected) from Mom's iPad Air to her MacBook Pro the following issue happens.

The MacBook Pro will connect & disconnect to the iPad Air every second. Example: First connection to MBP is successful and iTunes (or any other .app for that matter) recognizes it. +01 seconds into the connection it disconnects the +02 seconds it reconnects. This pattern will continune until the USB is disconnected from the MBP.

==Impt Note== This does not occur and there are no issues when connecting her other iOS devices (iPhone 6 & iPad mini).

@windyinsc
windyinsc / osx-for-hackers.sh
Created March 7, 2016 00:57 — 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'