this hopefully won't break all the things we've ever built
integration tests passed
I don't know if I should be happy or sad
On the release of AWS Edge Location in Vienna
schnitzel shops rejoice
// 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) { |
package transactions | |
import com.twitter.finagle.exp.mysql.{Client, OK, Result} | |
class Db(mysqlClient: Client) { | |
val insertOrder = "INSERT INTO orders (ref) VALUES(?)" | |
val insertOrderItem = "INSERT INTO order_items (order_id, item_id) VALUES(?, ?)" | |
def persistOrderWithItems[T](order: Order)(whenDone: (OK, Seq[Result]) => T): Future[T] = { |
#!/bin/sh | |
# Unicode NFD to NFC | |
# 標準出力に出力されるので、適当にパイプで処理する | |
iconv -f UTF-8-MAC -t UTF-8 input.txt |
#!/bin/sh | |
file "$1" | grep -q "text" | |
if [ $? -ne 0 ]; then | |
/usr/bin/open $1 | |
else | |
/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl $1:$2 | |
fi |
#!/usr/bin/env bash | |
# copied from http://mediadoneright.com/content/ultimate-git-ps1-bash-prompt | |
# Customize BASH PS1 prompt to show current GIT repository and branch. | |
# by Mike Stewart - http://MediaDoneRight.com | |
# TODO: scope the following env vars to this file only. They can be seen with `declare -p` | |
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset |
Generate a script to delete all images using the following. Copy paste into chrome console on the registry page of a project.
NOTE you must update the textToSave template string before running.
// Options(fill these out with your info)
// GITLAB_INSTANCE is the url to your custom instance or `gitlab.com`
const GITLAB_INSTANCE = 'gitlab.yourwebsite.com'
const GROUP = 'yourGroup'
plausible general principles governing valid agreements:
#!/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' | |
} |
#!/usr/bin/env zsh | |
branch=`git rev-parse --abbrev-ref HEAD` | |
git show-branch | ack '\*' | ack -v "$branch" | head -n1 | sed 's/.*\[\(.*\)\].*/\1/' | sed 's/[\^~].*//' | |
# How it works: | |
# 1| Display a textual history of all commits. | |
# 2| Ancestors of the current commit are indicated | |
# by a star. Filter out everything else. |