Skip to content

Instantly share code, notes, and snippets.

@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 / # 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 / 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 / RubyGems.ipynb.json
Created October 6, 2015 02:27
Ruby Gems available on Try Jupyter
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Ruby Gems available on Try Jupyter"
]
},
{
@l15n
l15n / random_japanese.rb
Created August 26, 2014 01:31
Generate random Japanese characters naively
module RandomJapanese
KANJI_LOWER_RANGE = 0x4E00
KANJI_UPPER_RANGE = 0x9FBF
HIRAGANA_LOWER_RANGE = 0x3040
HIRAGANA_UPPER_RANGE = 0x309F
KATAKANA_LOWER_RANGE = 0x30A0
KATAKANA_UPPER_RANGE = 0x30FF
class << self
def kanji(length = 1)
@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
@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 / gist:1007841
Created June 4, 2011 11:58
Apple Retail Stores by Country
Country Stores Population Population per Store
USA 236 308 million 1.3 million
UK 29 62 million 2.1 million
Canada 19 34 million 1.7 million
Australia 10 22 million 2.2 million
Japan 7 127 million 18 million
China 4 1,339 million 334 million
France 6 65 million 10.8 million
Germany 5 81 million 16 million
Italy 4 60 million 15 million
@l15n
l15n / devise.ja.yml
Created April 28, 2011 03:39 — forked from yhara/devise.ja.yml
Japanese locale file for devise http://github.com/plataformatec/devise/wiki/I18n
ja:
errors:
messages:
not_found: "は見つかりませんでした"
# not_found: "not found"
already_confirmed: "は既に登録済みです"
# already_confirmed: "was already confirmed"
not_locked: "は凍結されていません"
# not_locked: "was not locked"
not_saved: