Skip to content

Instantly share code, notes, and snippets.

View bobthecow's full-sized avatar

Justin Hileman bobthecow

View GitHub Profile
@bobthecow
bobthecow / top-github.md
Last active December 29, 2023 23:55 — forked from anvaka/top-github.md
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
bobthecow / tab.bash
Last active November 10, 2023 08:47
Open new Terminal tabs from the command line
#!/bin/bash
#
# Open new Terminal tabs from the command line
#
# Author: Justin Hileman (http://justinhileman.com)
#
# Installation:
# Add the following function to your `.bashrc` or `.bash_profile`,
# or save it somewhere (e.g. `~/.tab.bash`) and source it in `.bashrc`
#
@bobthecow
bobthecow / rules.rb
Last active April 27, 2023 16:43
Maid rules
# 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 / .gitconfig
Created June 10, 2010 15:30
Git aliases
[alias]
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; $EDITOR `f`"
add-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`"
lc = log ORIG_HEAD.. --stat --no-merges
smash = merge --no-commit --log
eat = branch -M
prune-all = !git remote | xargs -n 1 git remote prune
whois = "!sh -c 'git log -i --pretty=\"format:%an <%ae>\" --author=\"$1\" | sort -u' -"
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short
@bobthecow
bobthecow / radio_mustach_example.html
Created March 5, 2012 15:23 — forked from ebaxt/radio_mustach_example.html
Checking radio with Mustache
<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/mustache.js"></script>
</head>
<body>
<div id="formWrapper">
source ~/.rprompt.bash
export RPROMPT='$(date)'
@bobthecow
bobthecow / gps1.bash
Created December 28, 2010 21:55
A better PS1 for Git
#!/bin/bash
#
# A better PS1 for Git
#
# Author: Justin Hileman (http://justinhileman.com)
#
# Installation:
# Add the following function to your `.bashrc` or `.bash_profile`,
# or save it somewhere (e.g. `~/.gps1.bash`) and source it in `.bashrc`
@bobthecow
bobthecow / reflection.php
Created October 29, 2014 17:37
PHP is the best at reflection.
<?php //\\ dɥd¿>
;namespace ǝɔɐdsǝɯɐu;
class ssɐlɔ
{ //\\ }
function uoıʇɔunɟ
( )
{ //\\ }
;echo oɥɔǝ;
@bobthecow
bobthecow / cdg.bash
Created April 29, 2010 15:45
cd relative to the current Git repo
#!/bin/bash
#
# cd relative to the current Git repo
#
# Author: Justin Hileman (http://justinhileman.com)
#
# Installation:
# Add the following function to your `.bashrc` or `.bash_profile`,
# or save it somewhere (e.g. `~/.cdg.bash`) and source it in `.bashrc`
#