Skip to content

Instantly share code, notes, and snippets.

bobthecow /
Last active Sep 22, 2022 — forked from anvaka/
Top GitHub users by total number of stars

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 / 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ɥɔǝ;

Keybase proof

I hereby claim:

  • I am bobthecow on github.
  • I am 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}"
# Build a link
bobthecow / rules.rb
Last active Jul 25, 2021
Maid rules
View rules.rb
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/*')
bobthecow / tenkey.markdown
Created Nov 3, 2012
Mechanical USB numeric keypad landscape
View tenkey.markdown
View apc.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 / 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