This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/amix/vimrc | |
git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime && sh ~/.vim_runtime/install_awesome_vimrc.sh | |
# ~/.vim_runtime/my_configs.vim | |
set guifont=Monaco:h12 | |
set lines=50 columns=100 | |
set nu | |
set clipboard=unnamed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(2 to 9).map(i => (1 to 9).map(j => i + "*" + j + "=" + (i * j))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'csv' | |
require 'json' | |
require 'open-uri' | |
if ARGV[0].nil? | |
raise "wrong number of arguments (0 for 1..2)" | |
end | |
file = open(ARGV[0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'csv' | |
require 'json' | |
file_name = ARGV[0] | |
unless file_name.nil? | |
File.open(file_name) {|f| puts CSV.parse(f.read).to_json } | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://ubuntuguide.org/wiki/WebDAV | |
# install apache | |
sudo apt-get install apache2 | |
# ufw | |
# sudo ufw allow 80/tcp | |
# enable apache dav module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static String md5(String s) | |
{ | |
try | |
{ | |
// Create MD5 Hash | |
MessageDigest digest = MessageDigest.getInstance("MD5"); | |
digest.update(s.getBytes(Charset.forName("UTF-8"))); | |
byte messageDigest[] = digest.digest(); | |
// Create Hex String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rvm install | |
curl -L https://get.rvm.io | bash -s stable | |
source ~/.rvm/scripts/rvm | |
rvm install 2.0 | |
rvm --default use 2.0 | |
NewerOlder