Skip to content

Instantly share code, notes, and snippets.

View peco8's full-sized avatar
💭
Where's my Boy Bawang?

Toshiki Inami peco8

💭
Where's my Boy Bawang?
  • Rakuten, Inc
  • Tokyo
View GitHub Profile
@peco8
peco8 / benchmark.rb
Created August 11, 2016 12:47
benchmark
class ProgrammerProvicer
PROGRAMMERS = [
{
name: 'tanaka',
skills: ['Java','Oracle', 'HTML']
},
{
name: 'toshiki',
skills: ['C','Ruby', 'php']
},
@peco8
peco8 / implicit_conversion.rb
Last active September 11, 2016 10:35
# 2 Use built-in conversion protocols
winners = [
'HomeStar',
'King of town',
'Marzipan',
'Strongpad'
]
Place = Struct.new(:index, :name, :prize)
first = Place.new(0, 'first', 'Peasants quest game')
@peco8
peco8 / example_1.rb
Created September 11, 2016 11:14
#1 Collecting input
# No input
def seconds_in_day
24 * 60 * 60
end
# This is the same as below
SECONDS_IN_DAY = 24 * 60 * 60
ubuntu のキーボードを日本語対応にしたいが、うまくいかず、、
まず、
desktop manager として
- unity
- awesome がある
ログインするときの◯で選べる
どうやら使ってみた感じだと unity は微妙だけれど
awesome は使いやすい。これなら乗り換えれる。
@peco8
peco8 / remove_gbprotect.txt
Created July 19, 2017 13:09
How to uninstall global protect out of mac
sudo killall GlobalProtect && \
sudo chflags noschg /Applications/GlobalProtect.app/ && \
sudo rm -fR /Applications/GlobalProtect.app
```
#!/bin/bash
ps_out=`ps -ef | grep $1 | grep -v 'grep' | grep -v $0`
result=$(echo $ps_out | grep "$1")
if [[ "$result" != "" ]];then
echo "Running"
else
echo "Not Running"
fi
```
@peco8
peco8 / .gitconfig
Created September 1, 2017 11:50 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
# kubectl create
(...)
Available Commands:
clusterrole Create a ClusterRole.
clusterrolebinding Create a ClusterRoleBinding for a particular ClusterRole
configmap Create a configmap from a local file, directory or literal value
deployment Create a deployment with the specified name.
job Create a job with the specified name.
namespace Create a namespace with the specified name
poddisruptionbudget Create a pod disruption budget with the specified name.
@peco8
peco8 / Releaseflow.md
Created June 21, 2020 14:28 — forked from fujimaki-k/Releaseflow.md
リリースまでの流れ

リリースまでの流れ

1. フィーチャーブランチの作成

  • develop ブランチから新たに作成する機能のためのフィーチャーブランチを作成します。
git branch feature/new_feature develop

2. プログラムの開発とテスト

@peco8
peco8 / gist:54b21f779ea6d649804b1309689680a4
Created October 29, 2020 05:04
Apacheチューニング

mpm関連

パラメータ説明

項番 項目 説明 補足
1 StartServers Apache起動時の子プロセス数 Apache起動時にまずはここで設定された数の子プロセスを起動します
2 MinSpareServers 待機時の最小子プロセス数 子プロセスがMinSpareServersより少なくなったら、この値まで子プロセスを上げます
3 MaxSpareServers 待機時の最大子プロセス数 子プロセスがMaxSpareServersより大きくなったら、この値まで子プロセスを下げます
4 ServerLimit 設定可能なサーバプロセス数の上限 MaxClientsを256以上に設定したい場合はServerLimitも設定する必要があります。また、 MaxClientsの上に書かないと効きません
5 MaxClients 最大の小プロセス数 この数≒最大の同時接続数です