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
# store all solarized files in one place | |
mkdir ~/.solarized | |
cd ~/.solarized | |
# http://www.webupd8.org/2011/04/solarized-must-have-color-paletter-for.html | |
git clone https://github.com/seebi/dircolors-solarized.git | |
eval `dircolors ~/.solarized/dircolors-solarized/dircolors.256dark` | |
ln -s ~/.solarized/dircolors-solarized/dircolors.256dark ~/.dir_colors | |
git clone https://github.com/sigurdga/gnome-terminal-colors-solarized.git |
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
Date.civil( | |
*params[:date]. | |
values_at(*%w(year month day)). | |
map(&:to_i) | |
) rescue Time.now |
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
var http = new XMLHttpRequest(); | |
http.open("POST", "http://gsb.rf/api2/sessions"); | |
var params = "args=type:card,login:123,password:345"; | |
http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); | |
http.setRequestHeader("Content-length", params.length); | |
http.onreadystatechange = function() { | |
if (http.readyState == 4 && http.status == 200) { | |
console.info(http.responseText); | |
} | |
}; |