Skip to content

Instantly share code, notes, and snippets.

# Example Gemfile for
# http://l4u.github.io/articles/create-a-rails-4-site-with-contact-us-form/
# vim:fdm=marker fmr={,}
source 'https://rubygems.org'
ruby '2.0.0'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'
# Use sqlite3 as the database for Active Record
@l4u
l4u / gist:5776052
Last active December 18, 2015 11:29
download ievms with aria2c
aria2c -x4 -Z -P "https://az412801.vo.msecnd.net/vhd/IEKitV1_Final/VirtualBox/OSX/IE9_Win7/IE9.Win7.For.MacVirtualBox.part{1.sfx,2.rar,3.rar,4.rar,5.rar}"
@l4u
l4u / gist:5547784
Created May 9, 2013 14:29
rename sequentially
find . -name '*.png' \
| awk 'BEGIN{ a=0 }{ printf "mv %s %d.png\n", $0, a++ }' \
| bash
1024
632
391
241
149
92
57
35
21
13
@l4u
l4u / gist:5393612
Created April 16, 2013 05:39
Fixed empty updates tab on Mac App Store by reindexing spotlight
sudo mdutil -i on /
heroku labs:enable user-env-compile
/*
* Copyright (c) 2000,2001,2002 Guido Draheim <[email protected]>
* Use freely under the restrictions of the ZLIB License
*
* show a simple program to add xor-obfuscation.
* look at the resulting file with zzxordir an zzxorcat
* Remember that xor'ing data twice will result in the original data.
* This file has no dependency with zziplib - it's freestanding.
*/
@l4u
l4u / gist:4977164
Created February 18, 2013 12:54
Frameworks on Cowboy (excluding mochicow)
https://github.com/josevalim/dynamo
https://github.com/kivra/giallo
https://github.com/tsujigiri/axiom
aria2c http://download.basho.co.jp.try-cs.ycloud.jp/download/otp_src_R15B03-1.tar.gz
1) test_generate_match_with_literal_plus_identifier (Dynamo.Router.UtilsTest)
** (ExUnit.ExpectationError)
expected: {[:id],["foo",{:<>,[],["bar-",{:id,[],nil}]}]}
to be equal to (==): {[:id],["foo",{:<>,[import: Kernel],["bar-",{:id,[],nil}]}]}
at /Volumes/mac/Projects/dynamo/test/dynamo/router/utils_test.exs:45