Skip to content

Instantly share code, notes, and snippets.

function jjpr
set rev $argv[1]
if test -z "$rev"
set rev "@"
end
set bookmark $argv[2]
if test -z "$bookmark"
jj git push -c $rev
@lukerandall
lukerandall / jjevo.fish
Last active December 6, 2024 16:40
Make browsing the evolog easier with fzf
function grepsha
grep -oE "\b[0-9a-f]{7,}\b"
end
function jjevo
set rev $argv[1]
if test -z "$rev"
set rev "@"
end

Keybase proof

I hereby claim:

  • I am lukerandall on github.
  • I am lukerandall (https://keybase.io/lukerandall) on keybase.
  • I have a public key ASCbDp381tSsaepjtEBFAuIzTQwiwEcZnIzRtIuSpHSt-Qo

To claim this, I am signing this object:

@lukerandall
lukerandall / a.rb
Last active August 29, 2015 14:06
Distressed ducks
require 'time'
start_time = Time.now
readings, streaks, latest_streak = File.open('quacklog.txt').gets.split(', ').collect{|t| Time.parse(t)}, [], 0
readings.each_with_index do |t, i|
next if i == 0
if t - readings[i-1] <= 2.0
latest_streak += 1
else
streaks << latest_streak if latest_streak >= 3
@lukerandall
lukerandall / keybase.md
Created September 24, 2014 12:29
keybase.md

Keybase proof

I hereby claim:

  • I am lukerandall on github.
  • I am lukerandall (https://keybase.io/lukerandall) on keybase.
  • I have a public key whose fingerprint is 5276 C4BF 7D84 19B8 81A5 58EB 5663 DCF9 486C 62A4

To claim this, I am signing this object:

alias gap='git add -p'
alias gb='git branch'
alias gc='git commit -v'
alias gca='git commit -a -v'
alias gco="git checkout"
alias gd='git diff'
alias gdc='git diff --cached'
alias gdh='git diff HEAD'
alias gl='git pull'
alias glod='git log --oneline --decorate'
class Doorman
attr_reader :user, :portal, :account
def initialize(user, portal, account)
@user = user
@portal = portal
@account = account
end
# Returns a collection of accounts scoped to the user's rights of access.
class Doorman
attr_reader :user, :portal, :account
def initialize(user, portal, account)
@user = user
@portal = portal
@account = account
end
def accessible_accounts
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
(load-theme 'twilight-anti-bright)
set hidden " allow buffers to be hidden when they have unsaved changes
set visualbell " turn off beeps
set nobackup " don't need backups with git
call pathogen#runtime_append_all_bundles()
let mapleader = "," " map leader key
imap jj <Esc>
" Remap C-(e|y) so that they scroll by 3 lines