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
nytimes.com | |
zeit.de | |
sz.de | |
heise.de | |
spiegel.de | |
twitter.de | |
morgenpost.de | |
finanzen.net | |
newyorker.com | |
br.de |
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
def minimum_distance(a, b) | |
((a[0] - b[0]).abs > 0.1) || ((a[1] - b[1]).abs > 0.1) | |
end | |
last_coordinate = [0,0] | |
txt = File.read("/Users/shostakovich/data.txt") | |
puts "lat,lon,Name" |
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
-----BEGIN CERTIFICATE----- | |
MIIGNDCCBBygAwIBAgIBGDANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEW | |
MBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwg | |
Q2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNh | |
dGlvbiBBdXRob3JpdHkwHhcNMDcxMDI0MjA1NDE3WhcNMTcxMDI0MjA1NDE3WjCB | |
jDELMAkGA1UEBhMCSUwxFjAUBgNVBAoTDVN0YXJ0Q29tIEx0ZC4xKzApBgNVBAsT | |
IlNlY3VyZSBEaWdpdGFsIENlcnRpZmljYXRlIFNpZ25pbmcxODA2BgNVBAMTL1N0 | |
YXJ0Q29tIENsYXNzIDEgUHJpbWFyeSBJbnRlcm1lZGlhdGUgU2VydmVyIENBMIIB | |
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtonGrO8JUngHrJJj0PREGBiE | |
gFYfka7hh/oyULTTRwbw5gdfcA4Q9x3AzhA2NIVaD5Ksg8asWFI/ujjo/OenJOJA |
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
[push] | |
default = current | |
[alias] | |
pfush = "push --force" |
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
def [](name) | |
@table[name.to_sym] | |
end | |
def []=(name, value) | |
modifiable[new_ostruct_member(name)] = value | |
end |
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
class Sensor | |
OFFSET_IN_MBAR = 1000 | |
def current_pressure | |
OFFSET_IN_MBAR + random_pressure(); | |
end | |
private | |
def random_pressure |
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
class PseudoPrimeGenerator | |
include Enumerable | |
def initialize(ubound = nil) | |
@ubound = ubound | |
end | |
def upper_bound=(ubound) | |
@ubound = ubound | |
end |
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
class EratosthenesGenerator < PseudoPrimeGenerator | |
def initialize | |
@last_prime = nil | |
super | |
end | |
def succ | |
@last_prime = @last_prime ? EratosthenesSieve.instance.next_to(@last_prime) : 2 | |
end | |
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
# given enumerable object. | |
def |(enum) | |
dup.merge(enum) | |
end | |
alias + | ## | |
alias union | ## | |
# Returns a new set built by duplicating the set, removing every | |
# element that appears in the given enumerable object. | |
def -(enum) |
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
#!/bin/sh | |
USERNAME=shostakovich | |
mkdir ~/tmp | |
cd ~/tmp | |
# Install GCC + Git | |
curl https://github.com/downloads/kennethreitz/osx-gcc-installer/GCC-10.7-v2.pkg > GCC-10.7-v2.pkg | |
sudo installer -pkg GCC-10.7-v2.pkg -target / |
NewerOlder