This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import R from 'ramda' | |
class CR { | |
constructor(fn) { | |
this.runCR = (fn || R.identity) | |
} | |
} | |
R.keys(R).forEach(method => { | |
CR.prototype[method] = function() { | |
var rfn = arguments.length ? R[method].apply(null, arguments) : R[method] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const util = require('util') | |
module.exports.global = () => { | |
util.inspect.defaultOptions.maxArrayLength = null | |
util.inspect.defaultOptions.depth = null | |
} | |
module.exports.consoleJson = () => | |
console.json = (...args) => | |
console.log.apply(console, args.map(arg => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* HHKB Layout | |
*/ | |
// Remember to uncomment `KEYMAP_SECTION_ENABLE = yes` in Makefile | |
#include "keymap_common.h" | |
#ifdef KEYMAP_SECTION_ENABLE | |
const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] __attribute__ ((section (".keymap.keymaps"))) = { | |
#else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const groups = $('#data-table > tbody').map((index, elem) => ({ | |
title: $(elem).find('.group-title').text(), | |
entries: $(elem).find('.reports-table-children > tbody > tr').map((index, elem) => ({ | |
title: $.trim($(elem).find('.col-title').text()), | |
time: parseFloat($.trim($(elem).find('.col-total').text()), 10) | |
})).toArray() | |
})).toArray() | |
groups.forEach(group => { | |
const groupedEntries = group.entries.reduce((memo, entry) => { | |
memo[entry.time > 1 ? 'isolate' : 'merge'].push(entry) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
// Color from: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/ColorImagesText.html | |
class GuideColor { | |
static let cyan = UIColor(red: 90/255, green: 200/255, blue: 250/255, alpha: 1) | |
static let yellow = UIColor(red: 255/255, green: 204/255, blue: 0/255, alpha: 1) | |
static let orange = UIColor(red: 255/255, green: 149/255, blue: 0/255, alpha: 1) | |
static let pink = UIColor(red: 255/255, green: 45/255, blue: 85/255, alpha: 1) | |
static let blue = UIColor(red: 0, green: 122/255, blue: 255/255, alpha: 1) | |
static let green = UIColor(red: 76/255, green: 217/255, blue: 100/255, alpha: 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules | |
index.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on format_time(currTime as date) | |
set stamp to the time of currTime | |
set h to text -2 thru -1 of ("00" & (stamp div (60 * 60))) | |
set m to text -2 thru -1 of ("00" & (stamp - (60 * 60) * h) div 60) | |
set s to text -2 thru -1 of ("00" & (stamp - ((60 * 60) * h + 60 * m))) | |
return h & ":" & m & ":" & s | |
end format_time | |
-- from http://henrysmac.org/blog/2014/1/4/formatting-short-dates-in-applescript.html | |
on format_date(currTime as date) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (c) 2015-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
*/ | |
#import "AppDelegate.h" |