View redshift-unix-timestamp-to-datetime-example.sql
select timestamp 'epoch' + CAST(ts AS BIGINT)/1000 * interval '1 second' from (select 1498783941705 AS ts);
View 0_memo.md

多分 <use>  に fillstyle="fill: の指定が動かない

View .tern-project
{
"libs": [
"browser"
],
"plugins": {
"node": {},
"es_modules": {},
"node_resolve": {}
}
}
View keybase.md

Keybase proof

I hereby claim:

  • I am ToQoz on github.
  • I am toqoz (https://keybase.io/toqoz) on keybase.
  • I have a public key whose fingerprint is 10A4 F7B1 87B6 2716 30FD 8E94 F9A6 2FE5 FA5D B7B5

To claim this, I am signing this object:

View swagger-preview
#!/bin/sh
if [ -z "$1" ]; then
echo "usage: preview <swagger.yml path>"
exit 1
fi
tmpdir=$(mktemp -d /tmp/swagger-mode-tmp.XXXXXXXXXX)
swagger-codegen generate -i $1 -l html2 -o $tmpdir
open $tmpdir/index.html
View sugu-play.sh
#!/bin/bash
# ./play-bootstrap.sh -a app_name -s 2.11.7 -p 2.5.9
usage_exit() {
echo "Usage: $0 [-a application name] [-s scala version] [-p play version]" 1>&2
exit 1
}
while getopts p:a:s:b:h OPT
View xcode-app-required.rb
#/usr/bin/env ruby
require 'json'
JSON.parse(`brew info --json=v1 --installed`)
.select { |formula|
formula["requirements"].any? { |req| req["name"].downcase == "xcode" }
}
.each { |formula|
puts formula["name"]
View setuidgid-on-alpine.md

setusergroups

Dockerfile:

RUN apk add --no-cache --virtual .setusergroups-buildeps abuild build-base git autoconf automake && \
    git clone https://github.com/tokuhirom/setusergroups.git /opt/setusergroups && \
    (cd /opt/setusergroups && autoreconf -i && ./configure && make && make install) && \
    rm -r /opt/setusergroups && \
    apk del .setusergroups-buildeps
View boostrap.sh
# https://github.com/why-jay/osx-init/blob/master/install.sh#L25-L33
touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress;
PROD=$(softwareupdate -l |
grep "\*.*Command Line" |
head -n 1 | awk -F"*" '{print $2}' |
sed -e 's/^ *//' |
tr -d '\n')
softwareupdate -i "$PROD" -v;
git clone git@github.com:ToQoz/dotfiles.git ~/_dev/github.com/ToQoz/dotfiles