Wednesday, 30 March 2016

my wakeup script

Version1

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>com.kolovos.script</string>
<key>LaunchOnlyOnce</key>
<false/>
<key>Program</key>
<string>/Users/Ioannis/.wakeup/start.sh</string>
<key>RunAtLoad</key>
<true/>
<key>StartCalendarInterval</key>
<array>
<dict>
<key>Hour</key>
<integer>9</integer>
<key>Minute</key>
<integer>30</integer>
<key>Weekday</key>
<integer>1</integer>
</dict>
<dict>
<key>Hour</key>
<integer>9</integer>
<key>Minute</key>
<integer>30</integer>
<key>Weekday</key>
<integer>2</integer>
</dict>
<dict>
<key>Hour</key>
<integer>9</integer>
<key>Minute</key>
<integer>30</integer>
<key>Weekday</key>
<integer>3</integer>
</dict>
<dict>
<key>Hour</key>
<integer>9</integer>
<key>Minute</key>
<integer>36</integer>
<key>Weekday</key>
<integer>4</integer>
</dict>
<dict>
<key>Hour</key>
<integer>9</integer>
<key>Minute</key>
<integer>30</integer>
<key>Weekday</key>
<integer>5</integer>
</dict>
</array>
</dict>
</plist>
osascript -e 'tell application "iTunes" to play playlist "Feel Free"'
osascript -e "set Volume 10"
osascript -e 'tell application "Slack" to activate'
view raw start.sh hosted with ❤ by GitHub

Version 2

require 'time'
def wake_up!
`osascript -e 'tell application "iTunes" to play playlist "Feel Free"'`
`osascript -e "set Volume 10"`
`osascript -e 'tell application "Slack" to activate'`
end
wake_up_at = "09:30pm"
secs = Time.parse(wake_up_at) - Time.now
sleep secs
wake_up!
view raw wakeup.rb hosted with ❤ by GitHub

Tuesday, 29 March 2016

Thursday, 10 March 2016

Find all uniq stripe keys for identity


master_keys = []
["US",
"CA",
"AU",
"DK",
"NO",
"SE",
"FI",
"JP",
"AT",
"BE",
"DE",
"ES",
"FR",
"GB",
"IE",
"IT",
"LU",
"NL"].map do |e|
c = Stripe::CountrySpec.retrieve(e)
c = c[:verification_fields]
keys = []
keys<< c[:individual][:minimum]
keys<< c[:individual][:additional]
keys<< c[:company][:minimum]
keys<< c[:company][:additional]
master_keys << keys.flatten.uniq.map { |e| e.split(".")[0] }.uniq
end
puts master_keys.flatten.uniq
# [137] pry(main)> puts master_keys.flatten.uniq
# external_account
# legal_entity
# tos_acceptance
# In your params:
# white_listed_keys = ["legal_entity.", "tos_acceptance.", "additional_owners"]
white_listed_keys = master_keys.flatten.uniq
entities = entities.keep_if { |key, _|
key.to_s.start_with? *white_listed_keys
}
view raw keys.rb hosted with ❤ by GitHub

Wednesday, 9 March 2016

ατ_γουόρκ.αρ_μπί

yannis [1:39 PM]
kanei twra Ντεπλόι
georgia [1:40 PM]
έκανε ντεπλόι?
yannis [1:40 PM]
ναι έκανε
[1:40]
δεν θα χεις κανα `εξέπτιο` πιστεύω
georgia [1:44 PM]
αν έχω εξέπσιο θα πάρω νοτιφικέσιο
yannis [1:46 PM]
ρε βρίσκω μπανγκς πριν βρει ακομα το 5
georgia [1:49 PM]
κάτσε τεστάρω τώρα κάνω κιού είι
yannis [1:58 PM]
ola kala mexri twra
[1:58]
den prep na perneis αντιτιοναλ_ουνέρς
[1:59]
επισης δεν πέρνεις `λέγκαλ_έντιτι.αντίτιοναλ_όνερς`
[1:59]
σαν ομπτζεκτ
georgia [2:01 PM]
ποια έρρορς;
georgia [2:01 PM]
στο μπανκ ακαουντ?
yannis [2:00 PM]
`yolo` diladi?
[2:01]
w re fileeee
[2:01]
ti `απλικάτιο` ftiaxnoume
conclusion:
`λέγκαλ_έν` `τι` `τι` => https://www.youtube.com/watch?v=c5OIYfr5E1A
view raw gistfile1.txt hosted with ❤ by GitHub

Tuesday, 1 March 2016

Solution to 100-Hat Puzzle

Here’s the solution to the Puzzle of 100 Hats, as explained by the person who submitted it, Terence Gaffney, a mathematics professor at Northeastern University:


http://tierneylab.blogs.nytimes.com/2009/03/30/solution-to-100-hat-puzzle/?_r=1