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:
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
#!/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 |
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
#!/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 |
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
#/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"] |
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
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
# class User < ActiveRecord::Base | |
# include ActiveRecordSelfDiff | |
# end | |
# | |
# u = User.create(name: "toqoz") | |
# u.name = "toqoz-2" | |
# u.self_diff | |
# => {"name" => #<struct Struct::Diff old="toqoz", now="toqoz-2">} | |
module ActiveRecordSelfDiff |
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
SELECT | |
data.GLOBAL_BUFFER_SIZE, | |
data.THREAD_BUFFER_SIZE, | |
data.MAX_CONNECTIONS, | |
GLOBAL_BUFFER_SIZE + THREAD_BUFFER_SIZE * data.MAX_CONNECTIONS AS TOTAL_MEMORY_SIZE, | |
(GLOBAL_BUFFER_SIZE + THREAD_BUFFER_SIZE * data.MAX_CONNECTIONS)/1024 AS TOTAL_MEMORY_SIZE_KB, | |
(GLOBAL_BUFFER_SIZE + THREAD_BUFFER_SIZE * data.MAX_CONNECTIONS)/1024/1024 AS TOTAL_MEMORY_SIZE_MB, | |
(GLOBAL_BUFFER_SIZE + THREAD_BUFFER_SIZE * data.MAX_CONNECTIONS)/1024/1024/1024 AS TOTAL_MEMORY_SIZE_GB | |
FROM ( | |
( |
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
#!/bin/sh | |
set -e | |
npm_version() { | |
node -e 'console.log(require("./package.json").version)' | |
} | |
if [ ! -f ./package.json ]; then | |
echo "package.json is not found" >> /dev/stderr |