Skip to content

Instantly share code, notes, and snippets.

Justin Hileman bobthecow

Block or report user

Report or block bobthecow

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bobthecow
bobthecow / tab.bash
Last active Oct 12, 2019
Open new Terminal tabs from the command line
View tab.bash
#!/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`
#
View .bashrc
source ~/.rprompt.bash
export RPROMPT='$(date)'
@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
View .gitconfig
[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 / gps1.bash
Created Dec 28, 2010
A better PS1 for Git
View gps1.bash
#!/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 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 radio_mustach_example.html
<!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">
@bobthecow
bobthecow / cdg.bash
Created Apr 29, 2010
cd relative to the current Git repo
View cdg.bash
#!/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`
#
View gist:5189122

This is for RESTful PATCH awesomeness:

var myModel = new Backbone.Model({
  title:   "Current title",
  content: "Content",
  bonus:   42
});
You can’t perform that action at this time.