Skip to content

Instantly share code, notes, and snippets.

# -*- mode: ruby -*-
# vi: set ft=ruby :
# =============================================================================
# Set configuration variables here
project_name = File.basename(Dir.pwd)
server_ip = "192.168.22.10"
server_name = "dev.local.192.168.22.10.xip.io"
server_alias = "dev.local.*.xip.io"
@w0ng
w0ng / -
Created August 26, 2015 07:07
vagrant@debian:/vagrant/raci$ npm --loglevel verbose install
npm info it worked if it ends with ok
npm verb cli [ 'node', '/usr/bin/npm', '--loglevel', 'verbose', 'install' ]
npm info using npm@2.13.5
npm info using node@v0.12.7
npm verb node symlink /usr/bin/node
npm verb readDependencies loading dependencies from /vagrant/raci/package.json
npm verb install where, deps [ '/vagrant/raci', [ 'laravel-elixir', 'bower', 'gulp' ] ]
npm verb install where, peers [ '/vagrant/raci', [] ]
npm verb installManyTop reading for lifecycle /vagrant/raci/package.json
find . -name "*.flac" -exec bash -c 'f="{}"; ffmpeg -i "$f" -vf "crop=((in_w/2)*2):((in_h/2)*2)" -c:a alac "${f%.flac}.m4a"' \;
@w0ng
w0ng / install.sh
Last active August 29, 2015 14:12 — forked from fideloper/install.sh
#!/usr/bin/env bash
echo "========================"
echo "Installing base items..."
echo "========================"
apt-get update
apt-get install -y build-essential curl wget python-software-properties mlocate
echo "======================================"
echo "Presetting MySQL password to 'root'..."
@w0ng
w0ng / .vimrc
Last active January 14, 2016 15:43
Vim with no plugins
"
" ~/.vimrc
"
" No plugins. Based on https://github.com/w0ng/dotfiles/blob/master/.vimrc
" Compatability
set nocompatible " use vim defaults instead of vi
set encoding=utf-8 " always encode in utf
filetype plugin indent on
syntax on
@w0ng
w0ng / foo2.py
Last active August 29, 2015 14:07
#!/usr/bin/env python
import urllib.request
import codecs
import json
import re
# 'Pretty print'. Outputs stuff nicer than normal print. Good for lists
from pprint import pprint
url = 'https://en.wikipedia.org/w/api.php?action=parse&page=List_of_national_capitals_in_alphabetical_order&prop=wikitext&format=json'
#!/usr/bin/env python
import urllib.request
import codecs
import json
import re
# 'Pretty print'. Outputs stuff nicer than normal print. Good for lists
from pprint import pprint
url = 'https://en.wikipedia.org/w/api.php?action=parse&page=List_of_national_capitals_in_alphabetical_order&prop=wikitext&format=json'
#!/usr/bin/env python
import urllib2
import json
import re
# 'Pretty print'. Outputs stuff nicer than normal print. Good for lists
from pprint import pprint
url = 'https://en.wikipedia.org/w/api.php?action=parse&page=List_of_national_capitals_in_alphabetical_order&prop=wikitext&format=json'
response = urllib2.urlopen(url)
@w0ng
w0ng / gist:5e0a431531670e05dc4f
Created September 28, 2014 12:00
hybrid.itermcolors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.13229149580001831</real>
<key>Green Component</key>
<real>0.12323731929063797</real>
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
LABEL=arch-ssd / btrfs rw,noatime,compress=lzo,ssd,discard,space_cache,autodefrag,inode_cache,subvol=__active/rootvol 0 0
LABEL=arch-ssd /home btrfs rw,noatime,compress=lzo,ssd,discard,space_cache,autodefrag,inode_cache,subvol=__active/home 0 0
LABEL=scratch /mnt/scratch ext4 defaults 0 0
LABEL=data0 /mnt/data0 ntfs-3g uid=w0ng,gid=users,fmask=113,dmask=002 0 0