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
# Node A: | |
# iex --sname "nodea" | |
Process.register self, :iex | |
# Blocking | |
receive do | |
{ :hello, pid } -> | |
IO.puts "Hello from #{inspect(pid)}" | |
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 'twitter' | |
def twitter_client | |
@twitter_client ||= Twitter::REST::Client.new do |config| | |
config.consumer_key = 'XXXXXX' | |
config.consumer_secret = 'XXXXXX' | |
config.access_token = 'XXXXXX' | |
config.access_token_secret = 'XXXXXX' | |
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
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$.stratus({ | |
key: "Enter your Client ID here", | |
links: "https://soundcloud.com/zedsdead/sets/somewhere-else-ep" | |
}); | |
}); | |
</script> |
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
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$.stratus({ | |
auto_play: true, | |
download: false, | |
key: "Enter your Client ID here", | |
links: 'http://soundcloud.com/qotsa', | |
random: true | |
}); | |
}); |
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
def valid?(card_number) | |
digits = card_number | |
.split("") | |
.map { |number| number.to_i } | |
numbers = [] | |
digits.each_with_index do |digit, index| | |
if index.even? | |
numbers << digit * 2 | |
else |
OlderNewer