超雑にまとめました。修正してください。
登場人物
- アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
- 後輩: 頼んでばっかしで役に立たない。
- サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
- プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。
# See: https://qiita.com/jerrywdlee/items/b9b15380ac3fe87c68ad | |
require 'benchmark' | |
require 'csv' | |
class LargeUnicodeCsv | |
class << self | |
def generate(cnt = 1_000_000) | |
headers = %w[ID 名前 フリガナ 年齢 血液型 都道府県 携帯キャリア] | |
exec_benchmark do | |
CSV.open('dummy_data.csv', 'w', write_headers: true, headers: headers) do |csv| |
class Foo | |
def self.show_path_1 | |
foo_path | |
end | |
def show_path_2 | |
foo_path | |
end | |
end |
'use strict'; | |
const limit = 15; | |
let counter = 0; | |
const timer = setInterval(() => { | |
console.log(`Sample Log[${counter + 1}] at ${new Date()}`); | |
counter ++; | |
if (counter >= limit) { | |
clearInterval(timer); |
04e227baf13fb8312b7a953b49997aaca8b8522288b6349eb05381ad873715e40c670fd5f23ebbc184155acfae93e1ab5a784c898a3b22c44996f69d58b0cc7722 jerrywdlee-kagebunshin |
#!/bin/bash | |
# Insall: | |
# curl -L -s https://cdn.rawgit.com/jerrywdlee/7d70e765c56cd151c0c13fb11d1bdb3a/raw/b8df7028d7b317aaae113111d940d4b11d0e5e81/gi.sh > $HOME/.gi.sh | |
# echo "alias gi=\"bash \$HOME/.gi.sh\"" >> ~/.bash_profile && source ~/.bash_profile | |
# Usage: | |
# cd MYAPP && gi node rails | |
params=`echo $@ | tr ' ' ','` |
'use strict'; | |
// 知乎问题:投掷一枚骰子,掷出连续3次点数2在累积得到30次点数5之前的概率如何计算? | |
// https://www.zhihu.com/question/66227357 | |
const _ = require('lodash'); | |
const ROUND = 10; | |
const TEST_TIMES = [1000 * 10, 1000 * 100, 1000 * 1000, 1000 * 1000 * 10 ]; | |
mkdir ~/.bash_completion && cd ~/.bash_completion
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash > git-completion.bash
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh > git-prompt.sh
# Add in ~/.bashrc OR ~/.bash_profile
source ~/.bash_completion/git-prompt.sh
const STR_LEN = 80 | |
const SUSHI_INTERVAL =10 | |
let cnt = 0; | |
function sushiDraw(){ | |
const sa = new Array(STR_LEN).fill(' ') | |
for(let i = 0; i < STR_LEN; i += SUSHI_INTERVAL){ | |
const sushiIndex = sa.length - 1 - (cnt + i) % sa.length | |
sa.splice(sushiIndex, 1, '🍣') | |
} |
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- Include meta tag to ensure proper rendering and touch zooming --> | |
<meta charset="utf-8" content="width=device-width, initial-scale=0" /> | |
<!-- Include jQuery Mobile stylesheets --> | |
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css"/> |