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
[{"id":"ABW","iso2Code":"AW","name":"Aruba","region":{"id":"LCN","value":"Latin America & Caribbean (all income levels)"},"adminregion":{"id":"","value":""},"incomeLevel":{"id":"NOC","value":"High income: nonOECD"},"lendingType":{"id":"LNX","value":"Not classified"},"capitalCity":"Oranjestad","longitude":"-70.0167","latitude":"12.5167","population":[{"indicator":{"id":"SP.POP.TOTL","value":"Population, total"},"data":[{"date":"2014","decimal":"1","value":null},{"date":"2013","decimal":"1","value":"102911"},{"date":"2012","decimal":"1","value":"102384"},{"date":"2011","decimal":"1","value":"101932"},{"date":"2010","decimal":"1","value":"101597"}]},{"indicator":{"id":"SP.RUR.TOTL.ZS","value":"Rural population (% of total population)"},"data":[{"date":"2014","decimal":"0","value":null},{"date":"2013","decimal":"0","value":"57.942"},{"date":"2012","decimal":"0","value":"57.636"},{"date":"2011","decimal":"0","value":"57.302"},{"date":"2010","decimal":"0","value":"56.941"}]},{"indicator":{"id":"SP.RUR.TOTL","value" |
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 "all_your_base" | |
require "benchmark/ips" | |
require "minitest/autorun" | |
require "securerandom" | |
BASE62_CHARS = [ | |
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", | |
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", | |
"p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", | |
"E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowGroupToSeeBucketListInTheConsole", | |
"Action": [ | |
"s3:ListAllMyBuckets", | |
"s3:GetBucketLocation" | |
], | |
"Effect": "Allow", |
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
source "https://rubygems.org" | |
gem "nokogiri" |
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
colors = ["purple", "yellow", "blue", "white", "red", "green", "orange"] | |
puts colors[4] | |
puts colors[40] | |
puts colors.index("green") | |
puts colors.index("foo") | |
colors2 = [ | |
["tuesday", "purple"], | |
["saturday", "yellow"], |
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
# 1. assign the string "5" to a variable and display the value | |
# 2. assign the integer 5 to a variable and display the value | |
# 3. add the two variables by coercing the first value to an integer, assign | |
# that value to a variable, and display the value | |
# 4. add the two variables by coercing the second value to a string, assign | |
# that value to a variable, and display the value |
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
# 1. create a variable named 'a' with the value of 1 and display 'a' | |
# 2. create a variable named 'b' with the value of 2 and display 'b' | |
# 3. create a variable named 'c' with the value of 3 and display 'c' | |
# 4. create a variable named 'd' with the value of 10 and display 'd' | |
# 5. add 'a' and 'b' and display the result | |
# 6. add 'a' and 'd' and display the result | |
# 7. add 'a' and 'b' and 'c' and 'd' and display the result | |
# 8. multiply 'd' and 'b' and display the result | |
# 9. multiple 'd' by itself and display the result | |
# 10. divide 'd' by 'b' and display the result |
I hereby claim:
- I am phlipper on github.
- I am phlipper (https://keybase.io/phlipper) on keybase.
- I have a public key whose fingerprint is 18FE FBC6 C65E 4DA2 316E 56B3 876E 9949 2B9E B672
To claim this, I am signing this object:
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 sh -c "release=`lsb_release -c | cut -d':' -f2 | sed -e 's/^[ \t]*//g'` && grep $release-security /etc/apt/sources.list > /tmp/secsrc.list && apt-get -o Dir::Etc::sourcelist='/tmp/secsrc.list' -o Dir::Etc::sourceparts='-' update && apt-get --assume-no upgrade" |