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
#!/bin/bash | |
VERSION=${VERSION:-2.1523-vsc1.38.1} | |
WORK_DIR=/home/ubuntu/projects | |
USER_ID=1000 | |
GROUP_ID=1000 | |
PORT=8888 | |
TARBALL_URL=https://github.com/cdr/code-server/releases/download/$VERSION/code-server$VERSION-linux-x86_64.tar.gz |
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
#!/bin/bash | |
SE_URL=${SE_URL:-https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v4.29-9680-rtm/softether-vpnserver-v4.29-9680-rtm-2019.02.28-linux-x64-64bit.tar.gz} | |
apt-get update | |
apt install -y bridge-utils gcc make | |
curl -L $SE_URL | tar xfz - -C /usr/local/ | |
cd /usr/local/vpnserver | |
yes 1 | make |
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
#!/bin/bash | |
SE_USERNAME="${SE_USERNAME:-vscode}" | |
SE_PASSWORD="${SE_PASSWORD:-`more /dev/urandom | tr -d -c '[:alnum:]' | fold -w 8 | head -1`}" | |
SE_PSK="${SE_PSK:-vpn}" | |
HOST_IP="${HOST_IP:-`ip -f inet -o addr show eth0|cut -d\ -f 7 | cut -d/ -f 1`}" | |
DHCP_GW="${DHCP_GW:-192.168.28.1}" | |
DHCP_START="${DHCP_START:-192.168.28.100}" |
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
'Aichi': '愛知県', | |
'Akita': '秋田県', | |
'Aomori': '青森県', | |
'Chiba': '千葉県', | |
'Ehime': '愛媛県', | |
'Fukui': '福井県', | |
'Fukuoka': '福岡県', | |
'Fukushima': '福島県', | |
'Gifu': '岐阜県', | |
'Gunma': '群馬県', |
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
diff --git a/.env b/.env | |
new file mode 100644 | |
index 0000000..437bf23 | |
--- /dev/null | |
+++ b/.env | |
@@ -0,0 +1,3 @@ | |
+AUTH0_DOMAIN=XXXXXX.auth0.com | |
+AUTH0_CLIENT_ID=XXXXX | |
+AUTH0_CLIENT_SECRET=XXXXXX | |
\ No newline at end of file |
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
# install for gcloud cli | |
# https://docs.coder.com/docs/tech-faqs | |
apt install python2.7 python-pip -y | |
# install yarn for node | |
curl -o- -L https://yarnpkg.com/install.sh | sh | |
# install gcloud | |
curl -o- -L https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-219.0.1-linux-x86_64.tar.gz | tar xfz - -C /usr/local |
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
find . -name '*.bak' -type f -print0 | xargs -0 -n1 bash -c 'echo "mv \"$0\" ~/\".Trash/`basename \"$0\"`"\"' | 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
require 'open-uri' | |
require 'json' | |
response = open('http://www.idolfes.com/2016/json/timetable/time.json') | |
data = JSON.parse(response.read) | |
artists = {} | |
data.each do |day, stages| | |
stages.each do |stage, items| | |
items.each do |item| |
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 bash | |
rails_version="${RAILS_VERSION:-7}" | |
ruby_version="${RUBY_VERSION:-3.0}" | |
node_version="${NODE_VERSION:-16}" | |
docker run --rm -v `pwd`:/usr/src/app ruby:$ruby_version sh -c "gem install rails --version $rails_version && rails new /usr/src/app --database mysql ${RAILS_OPTIONS} --git --force --version $rails_version" | |
cat << __EOT__ > Dockerfile | |
FROM ruby:$ruby_version |
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 ruby | |
# ざっくりとしたメモリとCPU利用率を調べるプロファイラ | |
# ./profiler.rb "HOGE -foo" を実行するとHOGEコマンドを実行して | |
# メモリとCPUの利用率をSTDOUTに書き出します | |
# -p PIDを指定すると、指定したコマンドと同時に指定されたプロセスも | |
# 記録します | |
require "csv" | |
require "optparse" | |
out = STDOUT |