Skip to content

Instantly share code, notes, and snippets.

View sjl's full-sized avatar

Steve Losh sjl

View GitHub Profile

We use to stick into the SubtitleVersion.note strings such as "Rollback from version#" or "Uploaded" automatically. This was handy, because when looking at the review list, you could see that info. Helps debugging but also teams / users to grok what's going on.

However, it does have it's problems: no i18n / hard to customize messages, etc. For rollbacks,it's easy: since we already store the rollback_from_version_number, we can just check that and display that info.

I see the following alternatives: a) Stick it back into the SubtitleVersion.note field, with the issues raised above

b) Create a boolean ("from_upload") Keeps notes clean, easily 18n and customizable. However... (see bellow)

@sjl
sjl / gist:6466546
Last active December 22, 2015 11:38 — forked from panicsteve/gist:1641705
Dear soon-to-be-former user,
We've got some fantastic news! Well, it's great news for us anyway. You, on
the other hand, are fucked.
We've just been acquired by:
[ ] Facebook
[ ] Google
[ ] Twitter
@sjl
sjl / gdl-kif.vim
Created January 22, 2016 10:26 — forked from muupan/gdl-kif.vim
A sintax file for Game Description Language (GDL) in Knowledge Interchange Format (KIF).
" A sintax file for Game Description Language (GDL) in Knowledge
" Interchange Format (KIF).
"
" Put this file in .vim/syntax/ and and add set filetype gdl-kif
" Example:
" au BufRead,BufNewFile *.kif set filetype=gdl-kif
syntax region gdlKifLineComment start=+;+ end=+$+
syntax match gdlKifArrow '<='
syntax keyword gdlKifFactRelation base init true next
@sjl
sjl / test.lisp
Last active October 27, 2017 21:55
(defun instrument-candles (&key
((:instrument instrument))
((:price price) "M")
((:granularity granularity) "S5")
((:count count) 500)
((:from from)
(write-to-string
(local-time:timestamp-to-unix
(local-time:timestamp- (local-time::now) 5 :minute))))
((:to to)
@sjl
sjl / clhs.ros
Created January 21, 2018 01:10 — forked from fukamachi/clhs.ros
A Roswell script for opening HyperSpec page describing a given symbol in the default browser.
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros -Q -- $0 "$@"
|#
#|
A Roswell script to open the HyperSpec page of a specified symbol in the default browser.
@sjl
sjl / next_motion_mapping.vim
Created August 25, 2011 19:43 — forked from AndrewRadev/LICENSE
Execute a vim motion on the "next" text object
" Motion for "next/last object". For example, "din(" would go to the next "()" pair
" and delete its contents.
onoremap an :<c-u>call <SID>NextTextObject('a', 'f')<cr>
xnoremap an :<c-u>call <SID>NextTextObject('a', 'f')<cr>
onoremap in :<c-u>call <SID>NextTextObject('i', 'f')<cr>
xnoremap in :<c-u>call <SID>NextTextObject('i', 'f')<cr>
onoremap al :<c-u>call <SID>NextTextObject('a', 'F')<cr>
xnoremap al :<c-u>call <SID>NextTextObject('a', 'F')<cr>
@sjl
sjl / markdown.vim
Created June 21, 2011 19:47 — forked from vim-voom/markdown.vim
Markdown folding for Vim
" folding for Markdown headers, both styles (atx- and setex-)
" http://daringfireball.net/projects/markdown/syntax#header
"
" this code can be placed in file
" $HOME/.vim/after/ftplugin/markdown.vim
func! Foldexpr_markdown(lnum)
let l1 = getline(a:lnum)
if l1 =~ '^\s*$'