$ heroku config --json { "MYSQL_URL": "mysql://foo-bar/db" }
$ hlocalrun.sh 'echo $MYSQL_URL' mysql://foo-bar/db
public extension String { | |
public func chunkByLength(_ count: UInt) -> [String] { | |
var result = [String]() | |
var idx = characters.startIndex | |
while idx < characters.endIndex { | |
let next = characters.index(idx, offsetBy: Int(count), limitedBy: characters.endIndex) ?? characters.endIndex | |
if idx == next { | |
break | |
} | |
result.append(self[idx..<next]) |
package main | |
import ( | |
"io/ioutil" | |
"log" | |
"gopkg.in/yaml.v2" | |
) | |
type Config struct { |
IO.popen("pbcopy", "r+") { |io| io.puts("Hey"); io.close_write; } |
let t = 0 | |
const tapListener = e => { | |
let n = +new Date | |
if (n - t <= 500) { | |
e.preventDefault() | |
} | |
t = n | |
return false | |
} |
require 'active_support/core_ext/string' | |
require 'pp' | |
current_ts_prefix = '20170602000' | |
migrations = [] | |
[ | |
{ | |
model: 'Document', | |
table: 'documents', |
$ heroku config --json { "MYSQL_URL": "mysql://foo-bar/db" }
$ hlocalrun.sh 'echo $MYSQL_URL' mysql://foo-bar/db
#!/bin/sh | |
set -eu | |
# サーバのホスト名一覧 | |
SERVERS=( | |
"tnt1" | |
"tnt2" | |
) |
#!/bin/sh | |
set -ex | |
SSH_HOST=$1 | |
MODEL_NAME=$2 | |
OUTPUT_FILE="result_$MODEL_NAME.txt" | |
REMOTE_CMD="tail -n +1 /config/* /usr/bin/compile_time" | |
if [ -n "$PASSWORD" ]; then |
package main | |
import ( | |
"fmt" | |
"strconv" | |
) | |
var models = map[uint8]string{ | |
0x11: "Mini", | |
0x12: "Giant", |
function onOpen() { | |
var ui = SpreadsheetApp.getUi(); | |
var menu = ui.createMenu('Nicehash'); | |
menu.addItem('データを取得', 'myFunction'); | |
menu.addToUi(); | |
} | |
function myFunction() { | |
var doc = SpreadsheetApp.getActiveSpreadsheet(); |