Skip to content

Instantly share code, notes, and snippets.

View n0ts's full-sized avatar
🏠
Working from home

Naoya Nakazawa n0ts

🏠
Working from home
  • Freelancer
  • Tokyo, Japan
  • X @n0ts
View GitHub Profile
[hub]
protocol = https
[user]
name = <name>
email = n0ts@users.noreply.github.com
[alias]
ad = add
@n0ts
n0ts / install-verbose.out
Created October 17, 2017 23:15
nginx-full with mruby-module --verbose
$ brew install nginx-full --with-mruby-module --no-sandbox --verbose
==> Installing nginx-full from homebrew/nginx
==> Downloading https://nginx.org/download/nginx-1.12.1.tar.gz
Already downloaded: homebrew/nginx-full-1.12.1.tar.gz
==> Verifying nginx-full-1.12.1.tar.gz checksum
tar xzf homebrew/nginx-full-1.12.1.tar.gz
==> git init
Reinitialized existing Git repository in /homebrew/Cellar/mruby-nginx-module/1.20.1/share/mruby-nginx-module/.git/
==> git submodule init
==> git submodule update
@n0ts
n0ts / install.out
Last active October 17, 2017 23:09
nginx-full with mruby-module
$ brew install nginx-full --with-mruby-module --no-sandbox
==> Installing nginx-full from homebrew/nginx
==> Downloading https://nginx.org/download/nginx-1.12.1.tar.gz
######################################################################## 100.0%
==> git init
==> git submodule init
==> git submodule update
==> git add build_config.rb
==> git commit -m 'build_config.rb'
Last 15 lines from ~/Library/Logs/Homebrew/nginx-full/05.git:
https://www.dropbox.com/s/er3bofqrgnl6wue/Emacs-24.3.app.zip?dl=0
@n0ts
n0ts / sources.repo
Created October 3, 2012 10:58
SRPM yum repository for CentOS 6
[base-source]
name=CentOS-$full_releasever - Base source
baseurl=http://vault.centos.org/$full_releasever/os/Source/
gpgcheck=1
gpgkey=http://vault.centos.org//RPM-GPG-KEY-CentOS-6
priority=1
enabled=1
[updates-source]
@n0ts
n0ts / gist:c847f3d13142ab092043400a92e3df50
Created June 19, 2017 14:04
kumogata-tempate exanple
#
# iam-and-s3
#
require 'aws-sdk'
$: << File.dirname(__FILE__)
### common local library
require 'meta'
require 'aws'
IFS=$'\n'
for i in $(find . -type f -name '*.png'); do
dir=$(dirname "$i")
file=$(basename "$i" .png)
sips -s format jpeg $i --out "$dir/$file.jpg"
done
@n0ts
n0ts / get-aws-ec2-id-use-longer.sh
Created December 6, 2016 06:18
Get AWS EC2 ID longer for all region
for r in $(aws --region us-east-1 ec2 describe-regions | jq -r ".Regions[] | .RegionName"); do aws --region $r ec2 describe-id-format; done
@n0ts
n0ts / set-aws-ec2-id-use-longer.sh
Last active December 6, 2016 06:17
Set AWS EC2 ID longer for all region
for r in $(aws ec2 --region us-east-1 describe-regions | jq -r ".Regions[] | .RegionName"); do for i in "instance" "reservation" "volume" "snapshot"; do aws --debug --region $r ec2 modify-id-format --resource $i --use-long-ids; done; done
@n0ts
n0ts / my-net-tcp-timewait.patch
Last active October 19, 2016 06:33
TCP_TIMEWAIT_LEN patch
--- ./include/net/tcp.h-org 2016-10-18 18:14:54.051023657 +0900
+++ ./include/net/tcp.h 2016-10-19 13:51:41.959816976 +0900
@@ -111,8 +111,8 @@
* initial RTO.
*/
-#define TCP_TIMEWAIT_LEN (60*HZ) /* how long to wait to destroy TIME-WAIT
- * state, about 60 seconds */
+#define TCP_TIMEWAIT_LEN (1*HZ) /* how long to wait to destroy TIME-WAIT
+ * state, about 1 second */