Skip to content

Instantly share code, notes, and snippets.

View thejonanshow's full-sized avatar

Jonan Scheffler thejonanshow

View GitHub Profile

Keybase proof

I hereby claim:

  • I am 1337807 on github.
  • I am jonan (https://keybase.io/jonan) on keybase.
  • I have a public key whose fingerprint is 16A9 8E59 705B EFF2 3A92 2779 1E10 A32A 2520 5CD8

To claim this, I am signing this object:

@thejonanshow
thejonanshow / find_from_gemfile.rb
Created April 14, 2014 23:41
Searches the source of every gem in a Gemfile for a particular search term (using 'ag', The Silver Searcher)
term = ARGV[0]
puts "Searching all gems in Gemfile for #{term}..."
gemfile = File.read('Gemfile')
gems = gemfile.split("\n").map do |line|
next unless line.match(/gem '/)
line.split('gem').last.split(',').first.gsub("'","").split.first.strip
end.compact
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" >
$(window).load(function() {
$("#navFill").height($("#contentWrapper").height()-558);
});
var kkeys = [], konami = "38,38,40,40,37,39,37,39,66,65";
$(document).keydown(function(e) {
kkeys.push( e.keyCode );
@thejonanshow
thejonanshow / gist:a960511ee0d64f971527
Created May 20, 2014 04:07
Browser icons for Google Chrome, Mozilla Firefox and Internet Explorer
http://commons.wikimedia.org/wiki/File:Mozilla_Firefox_logo_2013.png
http://commons.wikimedia.org/wiki/File:Internet_Explorer_7_and_8_logo.png
http://commons.wikimedia.org/wiki/File:Google_Chrome_icon_(2011).png
http://upload.wikimedia.org/wikipedia/commons/9/9b/A._percula.jpg
http://upload.wikimedia.org/wikipedia/commons/e/eb/Mantis_shrimp_from_front.jpg
@thejonanshow
thejonanshow / gem_watcher_test_list
Last active August 29, 2015 14:01
A test list for the gem watcher application.
rake
rack
@thejonanshow
thejonanshow / gem_watcher_list_2
Created May 27, 2014 06:41
Another test list for gem watcher.
rspec
vcr
@thejonanshow
thejonanshow / dynamical.rb
Created October 20, 2014 04:07
Why does :explodes raise LocalJumpError: no block given (yield)?
class Dynamical
define_method :works_fine do |&block|
5.times { |n| block.call(n) }
end
def also_works_fine(&block)
5.times { |n| block.call(n) }
end
define_method :explodes do |&block|
1. The shape inscribed in blood is two shapes within a triangle.
2. The outermost shape isn't a pentagram.
3. Of the shape inscribed in blood and the shape whose word is Ch'rulthin, one is a circle and the other is the third shape.
4. Neither the shape inscribed in chalk nor the third shape from the many-pointed star should have the Wyrin word spoken over them.
5. You should speak the words Shub rignuth over the shape inscribed in hair.
358 desc "Rebuilds the vhost.map or nginx_vhost.map depending on OS, environ +ment, etc."
359 task(:rebuild_vhost_map => :environment) do
360 ClientDomain.rebuild_vhost_map
361 end