This file contains hidden or 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
| sudo apt-get install python-software-properties -y | |
| # 기존 jdk 모두 삭제 | |
| sudo apt-get purge openjdk* | |
| sudo add-apt-repository ppa:webupd8team/java | |
| sudo apt-get update | |
| # java7 install | |
| sudo apt-get install oracle-java7-installer -y |
This file contains hidden or 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 | |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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))) |
OlderNewer