Skip to content

Instantly share code, notes, and snippets.

View sjl's full-sized avatar

Steve Losh sjl

View GitHub Profile
  • Standard: Glenfiddich 10, Highland Park 12, or Glenlivet 12
  • Peaty: Ledaig 10, Caol Ila 12, Talisker 10, or Laphroaig 10 (Laphroaig is seriously peaty though)
  • Fruity: Glenmorangie's Quinta Ruban, or Aberlour A'bunadh (this one is really strong)
  • Honey: Dalwhinnie 15
  • Salty: Old Pulteney 12, or maybe the Bruichladdich 10
@sjl
sjl / kr4mb_math.xml
Created October 2, 2012 23:59
Math Layer
<item>
<name>Math Layer</name>
<appendix>Right Control key activates the Math key layer.</appendix>
<identifier>space_cadet.math_layer</identifier>
<autogen>
--KeyToKey--
KeyCode::CONTROL_R,
KeyCode::VK_STICKY_EXTRA3
@sjl
sjl / kr4mb_greek.xml
Created October 2, 2012 23:58
Greek Layer
<item>
<name>Greek Layer</name>
<appendix>Right PC Application key activates the Greek key layer.</appendix>
<identifier>space_cadet.greek_layer</identifier>
<autogen>
--KeyToKey--
KeyCode::PC_APPLICATION,
KeyCode::VK_STICKY_EXTRA4

If you want to help me test gitignore support in friendly-find:

  1. cd into one of your git repos with a .gitignore file in it.
  2. Run git ls-files | sort > /tmp/ffind-git.
  3. Run ffind -tf | cut -d '/' -f 2- | sort > /tmp/ffind-ffind
  4. Run diff -U3 /tmp/ffind-ffind /tmp/ffind-git to see a diff of which files ffind missed.
  5. Post the filenames and the ignore patterns that should have caught them in a comment here, if they're not too private.
If the pattern does not contain a slash /, git treats it as a shell glob pattern
and checks for a match against the pathname relative to the location of the
.gitignore file (relative to the toplevel of the work tree if not from
a .gitignore file).
Otherwise, git treats the pattern as a shell glob suitable for consumption by
fnmatch(3) with the FNM_PATHNAME flag: wildcards in the pattern will not match
a / in the pathname. For example, "Documentation/*.html" matches
"Documentation/git.html" but not "Documentation/ppc/ppc.html" or
"tools/perf/Documentation/perf.html".
@sjl
sjl / x.markdown
Created September 26, 2012 15:41
bcp47 sadness

The Problem(s)

Currently we store language codes in the database in a bastardized standard that's "Django's bastardized standard plus a bunch of extra languages". Some examples:

  • en
  • en-gb
  • pt
@sjl
sjl / halp.sql
Created September 25, 2012 18:16
inner joins in django orm
-- Find all languages whose tip versions have at least one subtitle.
-- =================================================================
-- Standard Django SELECT from a single table.
SELECT subtitles_subtitlelanguage.* FROM subtitles_subtitlelanguage
-- Find the tip versions for each language we eventually end up needing.
-- This results in an effective resultset containing:
-- (language_id, tip_version_number)
--

Basics

Keep your medbay powered down when not in use, and use the power for something else (like the engineering bay for extra dodge change).

Try to plan your route through systems ahead of time so you never need to backtrack.

Get as many zoltan crew members as possible. They provide a free bar of power to the bay they're standing in, which is crazy powerful compared to most of the other races.

Pause. all. the. time. in battle.