Skip to content

Instantly share code, notes, and snippets.

View raine's full-sized avatar

Raine Virta raine

View GitHub Profile
<?xml version="1.0"?>
<root>
<item>
<name>Remap F19 to Hyper</name>
<appendix>OS X doesn't have a Hyper. This maps F19 to Control + Shift + Option + Command.</appendix>
<identifier>f19_to_hyper</identifier>
<autogen>
--KeyToKey--
KeyCode::F19,
KeyCode::COMMAND_L,
local application = require "mjolnir.application"
local eventtap = require "mjolnir._asm.eventtap"
local fnutils = require "mjolnir.fnutils"
local hotkey = require "mjolnir.hotkey"
local keycodes = require "mjolnir.keycodes"
local timer = require "mjolnir._asm.timer"
local transform = require "mjolnir.sk.transform"
local window = require "mjolnir.window"
local alert = require "mjolnir.alert"
var R = require('ramda');
var abby = {name: 'Abby', age: 7, hair: 'blond'};
var fred = {name: 'Fred', age: 12, hair: 'brown'};
var rusty = {name: 'Rusty', age: 10, hair: 'brown'};
var alois = {name: 'Alois', age: 15, disposition: 'surly'};
var kids = [abby, fred, rusty, alois];
var propPass = R.curry(function (name, fn, obj) {
return fn(obj[name]);

Keybase proof

I hereby claim:

  • I am raine on github.
  • I am raine (https://keybase.io/raine) on keybase.
  • I have a public key whose fingerprint is 13BD 55B6 7803 EB4D BF62 7F78 0BF7 3F60 8C38 C491

To claim this, I am signing this object:

diff --git a/lib/parser.js b/lib/parser.js
index 8e9ca7f..7d61d85 100644
--- a/lib/parser.js
+++ b/lib/parser.js
@@ -730,15 +730,32 @@ parseError: function parseError(str, hash) {
}
},
parse: function parse(input) {
- var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
+ var self = this,
var R = require('ramda');
var trace = require('treis');
var xs = [1, 2, 3];
function add(a, b) {
return a + b;
}
trace('reduce', R.reduce)(trace(add), 10, xs); // => 16
@raine
raine / test.js
Last active August 29, 2015 14:19
var lines = R.split('\n');
var unlines = R.join('\n');
var lineLens = R.lens(lines, unlines);
lineLens.map(R.map(R.concat(R.__, '!')), 'foo\nbar'); // => 'foo!\nbar!'
#!/usr/bin/env bash
data_url=https://gist.githubusercontent.com/jorin-vogel/7f19ce95a9a842956358/raw/e319340c2f6691f9cc8d8cc57ed532b5093e3619/data.json
file=`date "+%Y%m%d"`.csv
echo name,creditcard > $file
curl $data_url | jq -r 'map(select(.creditcard)) | .[] | [.name,.creditcard] | @csv' >> $file
@raine
raine / index.ls
Last active August 29, 2015 14:20
require! LiveScript
require! vm
code = process.argv.2
|> LiveScript.compile _, {+bare, -header}
sandbox = {}
sandbox <<< require 'ramda'
ctx = vm.create-context sandbox
val = vm.run-in-context code, ctx
{
"friends": [
{
"fullName": "Mitchell Henson"
},
{
"fullName": "Carroll Walker"
},
{
"fullName": "Carla Sargent"