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
## Demo for BOSH v3 | |
## https://github.com/amitkgupta/boshv3 | |
# Versions | |
bosh env | |
bosh —version | |
minikube status | |
minikube version | |
kubectl version |
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
package main | |
import ( | |
"crypto" | |
crand "crypto/rand" | |
"crypto/rsa" | |
"crypto/x509" | |
"crypto/x509/pkix" | |
"math/big" | |
mrand "math/rand" |
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
package main | |
import ( | |
"errors" | |
"fmt" | |
"math/rand" | |
"os" | |
"os/exec" | |
) |
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
// Problem: https://cryptopals.com/sets/1/challenges/6 | |
// | |
// Solution: http://www.azlyrics.com/lyrics/vanillaice/playthatfunkymusic.html (more or less) | |
// | |
// Usage: Just 'go run' this file! | |
package main | |
import ( | |
"fmt" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 is_fibonacci?(num) | |
n = (Math.log(num*2.23606797749979 + 0.5) * 2.0780869213681945).floor | |
num == (1.6180339887**n * 0.4472135954999579).round | |
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 Point | |
attr_reader :lat, :long | |
def initialize(lat, long) | |
@lat = lat.to_f | |
@long = long.to_f | |
if (-Math::PI/2 > @lat || @lat > Math::PI/2) | |
raise "lat must between -PI/2 and PI/2, inclusive" | |
end |