Skip to content

Instantly share code, notes, and snippets.

View gerrywastaken's full-sized avatar
🔎
🔬 🕺 🔒 🌎 👾

Gerry gerrywastaken

🔎
🔬 🕺 🔒 🌎 👾
View GitHub Profile
iris[0].data = {
target: :setosa
sepal_length: 5.1,
sepal_width: 3.5,
petal_length: 1.4,
petal_width: 0.2
}
@gerrywastaken
gerrywastaken / bigquery-most-popular-gems.sql
Created July 6, 2016 00:40
Getting a list of the most popular gems used in public gem projects on github: https://bigquery.cloud.google.com/dataset/bigquery-public-data:github_repos

Keybase proof

I hereby claim:

  • I am gerrywastaken on github.
  • I am gerrywastaken (https://keybase.io/gerrywastaken) on keybase.
  • I have a public key ASAbJrjqql8qJmAmZPeL_3KneKZ9iOh0oWtiQkxWMTKVjgo

To claim this, I am signing this object:

scriptEl.onload = function() {
alert('yo')
} 
class Object
def |
yield(self)
end
end
'./public/webpack/manifest.json'
.|(&File.method(:read))
.|(&JSON.method(:parse))
proxy-435.dialup.xtra.co.nz - - [22/Apr/2009:18:52:51 +1200] "GET /images/photos/455.jpg HTTP/1.1" 200 986 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.13" "-"
proxy-435.dialup.xtra.co.nz - - [22/Apr/2009:18:52:51 +1200] "GET /images/nav/tab_left_middle.gif HTTP/1.1" 200 1020 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.13" "-"
dyn-530.optus.com.au - - [22/Apr/2009:18:52:51 +1200] "GET /images/photos/5332.jpg HTTP/1.1" 200 244 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322)" "-"
dhcp-465.telstra.com.au - - [22/Apr/2009:18:52:51 +1200] "GET /gallery.php?section=entertainment HTTP/1.0" 200 58636 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.13" "-"
proxy-435.dialup.xtra.co.nz - - [22/Apr/2009:18:52:51 +1200] "GET /adclick.php?c=LME2 HTTP/1.1" 302 378 "-" "Moz
@gerrywastaken
gerrywastaken / debug require loadpath.rb
Created August 15, 2020 14:42
Find the path that Ruby's require statement tries to load. This is actually inaccurate as it misses steps like checking an absolute path, but it worked for my use case.
def debug_require(path)
$LOAD_PATH.each do |lp|
full_path = "#{lp}/#{path}"
puts full_path if File.file?(full_path)
full_rb_path = "#{full_path}.rb"
puts full_rb_path if File.file?(full_rb_path)
end
end
@gerrywastaken
gerrywastaken / Exercise: Fibonacci closure.go
Created October 26, 2020 22:08
Answer to Exercise: Fibonacci closure in A Tour of Go
# An answer to https://tour.golang.org/moretypes/26
# This is a bit more readable than other examples that I found online
# Implement a fibonacci function that returns a function (a closure) that returns successive fibonacci numbers (0, 1, 1, 2, 3, 5, ...).
package main
import "fmt"
// fibonacci is a function that returns
// a function that returns an int.
@gerrywastaken
gerrywastaken / go_gotchas.go
Created November 1, 2020 12:45
Gotchas in Go-lang
// Interfaces assigned a value of `nil` are not equal to `nil`
package main
import "fmt"
type I interface {
}
type T struct {
@gerrywastaken
gerrywastaken / doom.org
Last active November 25, 2021 04:35 — forked from hjertnes/doom.txt
Doom Emacs Cheatsheet (org-mode file)

SPC

SPC: find file , switch buffer . browse files

MX

; EX < switch buffer ` eval u universal arg x pop up scratch