I hereby claim:
- I am jpbochi on github.
- I am jpbochi (https://keybase.io/jpbochi) on keybase.
- I have a public key whose fingerprint is 63F8 99D6 4386 AA0C AF2F FA06 46C0 764A 272F 53FC
To claim this, I am signing this object:
| // The code below will extend underscore.js adding the groupByAndMap function. | |
| // groupByAndMap works like the regular groupBy, but it accepts an optional third "selector" argument. | |
| // The 'selector' is used to select values inside each group. | |
| // As usual in underscore, you can either pass a function or a string with the name of an attribute you want. | |
| // groupByAndMap is useful when you don't want the key to be present in the values inside the group. | |
| // Also, it completely covers the groupBy functionality because the last argument is optional. | |
| // If you want, you can replace groupBy instead of defining a new function. | |
| _.mixin({ | |
| groupByAndMap: function(list, keySelector, valueSelector) { |
| var Robot = function(robot) { | |
| robot.rotateCannon(-90); | |
| }; | |
| Robot.prototype.onIdle = function(ev) { | |
| var robot = ev.robot; | |
| robot.ahead(); | |
| //i'll add a clone but i need to refactor collision | |
| //robot.clone(); | |
| }; |
| //FightCode can only understand your robot | |
| //if its class is called Robot | |
| var Robot = function(robot) { | |
| }; | |
| var helperFuncs = { | |
| center: function (robot, helper) { | |
| return {x: robot.arenaWidth/2, |
| //http://repl.it/IOn | |
| function problem(colors, prisoners) { | |
| function randomHat() { | |
| return Math.floor(Math.random() * colors); | |
| } | |
| function randomHats() { | |
| var hats = []; | |
| for (var i = 0; i<prisoners; i++) { |
| #!/bin/sh | |
| # copied from https://gist.github.com/sos4nt/5245210 | |
| # In iTerm's Preferences > Profiles > Default > Advanced > Semantic History, | |
| # choose "Run command..." and enter "/your/path/to/iterm_open_with \1 \2". | |
| file "$1" | grep -q "text" | |
| if [ $? -ne 0 ]; then | |
| /usr/bin/open $1 | |
| else |
| #!/usr/bin/env bash | |
| # Bash3 Boilerplate. Copyright (c) 2014, kvz.io | |
| # http://kvz.io/blog/2013/11/21/bash-best-practices/ | |
| # https://github.com/kvz/bash3boilerplate | |
| set -o errexit | |
| set -o pipefail | |
| set -o nounset | |
| # set -o xtrace |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env sh | |
| set -eu | |
| eval $(ssh-agent -s) | |
| KEYS=$(ls -p /var/ssh-keys/ | grep -v -e '/' -e config -e known_hosts -e '.pub$' -e authorized_keys) | |
| echo "$KEYS" | xargs -I % ssh-add /var/ssh-keys/% | |
| mkdir -p /root/.ssh | |
| ssh-keyscan github.com >> /root/.ssh/known_hosts | |
| echo 'host github.com' > /root/.ssh/config |
| #!/usr/bin/env bash | |
| set -eu | |
| log () { | |
| echo >&2 "[lock] $@" | |
| } | |
| putLock () { | |
| aws s3api put-object --region $REGION --bucket $BUCKET --key $LOCK_KEY --output text --query 'VersionId' | |
| } |
| hs.loadSpoon('ControlEscape'):start() -- Load Hammerspoon bits from https://github.com/jasonrudolph/ControlEscape.spoon | |
| FRemap = require('foundation_remapping') -- https://github.com/hetima/hammerspoon-foundation_remapping | |
| remapper = FRemap.new() | |
| remapper:remap('§', '`') | |
| remapper:register() | |
| remapperDE = FRemap.new({vendorID=0x258a, productID=0x1006}) | |
| remapperDE:remap('lcmd', 'lalt') |