Skip to content

Instantly share code, notes, and snippets.

Justin Hileman bobthecow

View GitHub Profile
@bobthecow
bobthecow / top-github.md
Last active Jan 5, 2019 — forked from anvaka/top-github.md
Top GitHub users by total number of stars
View top-github.md

I was playing with GitHub Archive recently. Out of curiosity I ran this query:

SELECT COUNT(repository_owner) as totalStars, repository_owner
FROM [githubarchive:github.timeline] 
WHERE type = 'WatchEvent'
AND repository_organization IS NULL
GROUP BY repository_owner
ORDER BY totalStars DESC
@bobthecow
bobthecow / reflection.php
Created Oct 29, 2014
PHP is the best at reflection.
View reflection.php
<?php //\\ dɥd¿>
;namespace ǝɔɐdsǝɯɐu;
class ssɐlɔ
{ //\\ }
function uoıʇɔunɟ
( )
{ //\\ }
;echo oɥɔǝ;
View keybase.md

Keybase proof

I hereby claim:

  • I am bobthecow on github.
  • I am bobthecow (https://keybase.io/bobthecow) on keybase.
  • I have a public key whose fingerprint is 9177 E181 69EE D627 6F32 7A45 02BA 291C FB37 7198

To claim this, I am signing this object:

View gist:5189122

This is for RESTful PATCH awesomeness:

var myModel = new Backbone.Model({
  title:   "Current title",
  content: "Content",
  bonus:   42
});
View gist:4774286
# if you want an icon, add it to your attributes:
# menu_link('Foo', '/foo/', icon: 'bar')
def menu_link(text, target, attributes={})
# Prepend the icon, if supplied
if icon = attributes.delete(:icon)
text = "<i class='#{icon}'></i>#{text}"
end
# Build a link
@bobthecow
bobthecow / rules.rb
Last active Dec 9, 2015
Maid rules
View rules.rb
# https://github.com/benjaminoakes/maid
Maid.rules do
## Trash a bunch of downloaded stuffs ##
rule 'Trash duplicate downloads' do
# Keep the dupe with the shortest filename
trash verbose_dupes_in('~/Downloads/*')
end
@bobthecow
bobthecow / tenkey.markdown
Created Nov 3, 2012
Mechanical USB numeric keypad landscape
View tenkey.markdown
View apc.php
<?php
// load n classes from the filesystem
if (count($argv) !== 3) {
throw new InvalidArgumentException('usage: php apc.php numtemplates size');
}
$numtemplates = $argv[1];
$templatesize = $argv[2];
@bobthecow
bobthecow / gist:3866586
Created Oct 10, 2012
A proposal for the Nanoc 4.0 Rules DSL
View gist:3866586

A proposal for the Nanoc 4.0 Rules DSL

I'd love to see something very much like this:

# Rules

compile '/article/*' do
  filter :erb
You can’t perform that action at this time.