Skip to content

Instantly share code, notes, and snippets.

{
"key": "enter",
"command": "-dance.selections.toggleIndices",
"when": "editorTextFocus && dance.mode == 'normal'"
},
{
"key": "alt+u",
"command": "-dance.history.undo.selections",
"when": "editorTextFocus && dance.mode == 'normal'"
},
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: __dirname + '/build',
},
module: {
rules: [
{
test: /\.rs$/,
I downloaded about 1000 sigchains and looked at [which kinds of stanzas](https://gist.github.com/lord/ac6822e6ee669ddeed1c) they have based on sig type.
There were only 5 examples of `sibkey` and `subkey` so perhaps we'd need more types of stanzas there (like `revoke`?), but here's my proposal for the rules:
- all chainlinks
- `key`*
- `type`*
- `version`*
- `client`
- `merkle_root`
@lord
lord / wu.go
Created August 2, 2014 16:45
Wu Antialiasing
func DrawLine(x0, y0, x1, y1 float64) {
steep := (math.Abs(y1-y0) > math.Abs(x1-x0))
if steep {
x0, y0 = y0, x0
x1, y1 = y1, x1
}
if x0 > x1 {
x0, x1 = x1, x0
y0, y1 = y1, y0

Keybase proof

I hereby claim:

  • I am lord on github.
  • I am lord (https://keybase.io/lord) on keybase.
  • I have a public key whose fingerprint is B545 7869 8CEC CA0A B0E2 B370 D0AA FFA7 F92B 48A4

To claim this, I am signing this object:

@lord
lord / random_mancala_player.rb
Created February 20, 2014 19:10
Ruby Mancala Fight Club Bot
require 'net/http'
SERVER = "http://hsfightclub.herokuapp.com"
puts "Enter your player ID:"
PLAYER_ID = gets.strip
# This function gets the status of the board from the server, and returns it as a string
def get_status
uri = URI("#{SERVER}/mancala/status?player_id=#{PLAYER_ID}")
return Net::HTTP.get(uri)
@lord
lord / gist:6372182
Last active December 21, 2015 21:59
Failing output that I'm getting from swagger-codegen/sbt assembly. (see https://github.com/wordnik/swagger-codegen/issues/84)
$ ./sbt assembly
Detected sbt version 0.13.0
[info] Loading project definition from /Users/lordr/Desktop/newdir/swagger-codegen/project
[info] Updating {file:/Users/lordr/Desktop/newdir/swagger-codegen/project/}swagger-codegen-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Set current project to swagger-codegen (in build file:/Users/lordr/Desktop/newdir/swagger-codegen/)
[warn] Credentials file /Users/lordr/.ivy2/.credentials does not exist
[info] Updating {file:/Users/lordr/Desktop/newdir/swagger-codegen/}swagger-codegen...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
@lord
lord / backup.sh
Last active December 15, 2015 21:59
My simple Dropbox backup script. Just stick in the root directory of your backup drive, and run it to do a complete backup of your dropbox, including symlinks.
#!/bin/bash
BASEDIR=$(dirname "$0")
cd "$BASEDIR"
cp -RLv ~/Dropbox ./$(date +%Y-%m-%d)