Skip to content

Instantly share code, notes, and snippets.

@l15n
l15n / enumetric.rb
Created June 28, 2012 02:29
Roughly estimate usage of Enumerable methods
#! /usr/bin/env ruby
#
# enumetric.rb
#
# Rough estimate of usage/non-usage of Enumerable methods
TRIVIAL_METHODS = [:first, :count, :to_a]
def count_usage(method, dir = '.')
method_delimiter = '[\s\.\{\(=]'
@l15n
l15n / # arpack - 2016-08-10_16-18-01.txt
Created August 10, 2016 07:25
arpack (homebrew/science/arpack) on Mac OS X 10.11.6 - Homebrew build logs
Homebrew build logs for homebrew/science/arpack on Mac OS X 10.11.6
Build date: 2016-08-10 16:18:01
@l15n
l15n / # octave - 2016-08-10_17-09-27.txt
Created August 17, 2016 04:56
octave (homebrew/science/octave) on Mac OS X 10.11.6 - Homebrew build logs
Homebrew build logs for homebrew/science/octave on Mac OS X 10.11.6
Build date: 2016-08-10 17:09:27
@l15n
l15n / rails.ipynb.json
Last active May 22, 2018 16:45
Rails and Jupyter
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
@l15n
l15n / Local Branches
Last active September 17, 2021 16:17 — forked from schacon/gist:942899
Delete all remote branches on your fork `mine` which have already been merged into upstream `origin/master`
$ git branch --merged master |
grep -v '*' |
grep -v master |
xargs -L1 |
xargs git branch -d
@l15n
l15n / git-branches-by-commit-date.sh
Created July 13, 2012 08:47 — forked from jasonrudolph/git-branches-by-commit-date.sh
List remote Git branches and the last commit's author and author date for each branch. Sort by most recent commit's author date.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ai %ar by %an" $branch | head -n 1` \\t$branch; done | sort -r