openpgp4fpr:3998E3DE9E1C948D394A0154371F2E5A0E0B0BE6
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
|
I hereby claim:
- I am ksoda on github.
- I am kensono (https://keybase.io/kensono) on keybase.
- I have a public key whose fingerprint is 444F 2B4E 46D0 04B0 99F8 B114 D227 5094 0348 76CE
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
psql -U postgres -h localhost \ | |
-XAtc "SELECT tablename FROM pg_catalog.pg_tables where schemaname='public'" | while read table | |
do psql -U postgres -h localhost \ | |
-c "\copy (SELECT * FROM $table) to $table.csv with csv header" | |
done |
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 NoPoopInString < Base | |
extend AutoCorrector | |
MSG = 'Where did you learn that?' | |
def on_str(node) | |
bad = '💩' | |
return unless node.source.include?(bad) | |
add_offense(node) do |corrector| | |
corrector.replace(node, node.source.tr(bad, '🌈')) | |
end |
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
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
warn 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(true) do | |
source 'https://rubygems.org' |
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
# frozen_string_literal: true | |
class SimpleKvs # :nodoc: | |
def self.call(file_name) | |
raf = File.open(file_name, 'r+') | |
new(raf) | |
end | |
def initialize(raf) | |
@raf = raf |
前回の続き。
錠前は次の性質を持つ。
- 現在の鍵の組み合わせを保持する
- 疑似乱数を生成する(フィードバックレジスタ)
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 go run "$0" "$@"; exit "$?" | |
package main | |
import ( | |
"fmt" | |
"os" | |
"github.com/codeskyblue/go-sh" | |
) |
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
//javascript: | |
(() => { | |
const mkDebounce = fn => { | |
let timeoutId; | |
let resolves = []; | |
return function(...args) { | |
return new Promise(resolve => { | |
clearTimeout(timeoutId); | |
timeoutId = setTimeout(() => { | |
timeoutId = null; |
NewerOlder