Skip to content

Instantly share code, notes, and snippets.

Avatar
🔎
🔬 🕺 🔒 🌎 👾

Gerry gerrywastaken

🔎
🔬 🕺 🔒 🌎 👾
View GitHub Profile
@gerrywastaken
gerrywastaken / debug require loadpath.rb
Created Aug 15, 2020
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.
View debug require loadpath.rb
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
View test-file-for-logstalgia
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
View rub_pipes.rb
class Object
def |
yield(self)
end
end
'./public/webpack/manifest.json'
.|(&File.method(:read))
.|(&JSON.method(:parse))
View bleh.js
scriptEl.onload = function() {
alert('yo')
} 
View keybase.md

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:

View bigquery-most-popular-gems.sql
View machine_learning_iris_example.rb
iris[0].data = {
target: :setosa
sepal_length: 5.1,
sepal_width: 3.5,
petal_length: 1.4,
petal_width: 0.2
}
View less_repetitive_weather_links.html
View angular_resource_get_callback.js
$scope.weatherResult = $scope.weatherApi.get(
{ q: $scope.city, cnt: 2 },
function(result) {
console.log(result)
}
);
View famous-101-positioning-4-simplified.js
var Engine = require('famous/core/Engine');
var Surface = require('famous/core/Surface');
var StateModifier = require('famous/modifiers/StateModifier');
var Transform = require('famous/core/Transform');
var mainContext = Engine.createContext();
function translateModifier(){
return new StateModifier({
transform: Transform.translate(200, 0, 0)
You can’t perform that action at this time.