Skip to content

Instantly share code, notes, and snippets.

PS D:\01_Project\rails-sample> docker-compose up
[+] Running 2/0
✔ Container rails-sample-db-1 Running 0.0s
✔ Container rails-sample-web-1 Created 0.0s
Attaching to rails-sample-db-1, rails-sample-web-1
rails-sample-web-1 | => Booting Puma
rails-sample-web-1 | => Rails 7.1.3.2 application starting in production
rails-sample-web-1 | => Run `bin/rails server --help` for more startup options
rails-sample-web-1 | Exiting
rails-sample-web-1 | /usr/local/bundle/ruby/3.2.0/gems/railties-7.1.3.2/lib/rails/application.rb:658:in `validate_secret_key_base': Missing `secret_key_base` for 'production' environment, set this string with `bin/rails credentials:edit` (ArgumentError)
@pogin503
pogin503 / gist:3808219
Created September 30, 2012 19:25
My TopCoder template (C++)
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
# bash etc
jupyterlab.sh 8888 /Volumes/ext_SSD/ \
1>> /Users/${USER}/var/log/jupyter/jupyterlab.log \
2>> /Users/${USER}/var/log/jupyter/jupyterlab.err.log &
# fish
jupyterlab.sh 8888 /Volumes/ext_SSD/ \
1>> /Users/{$USER}/var/log/jupyter/jupyterlab.log \
2>> /Users/{$USER}/var/log/jupyter/jupyterlab.err.log &
Fri Aug 7 21:59:21 UTC 2020
Thu Apr 30 14:31:03 UTC 2020
@pogin503
pogin503 / Array1Dto4D_new_and_delete.cpp
Created March 28, 2012 12:49
配列の1次元から4次元までの配列の書き方
#include <iostream>
using namespace std;
int main()
{
//例1の解決方法
//1~4の多次元配列
try{
//一次元配列の場合(int p[10])
(defun nabeatsu (n)
(loop for i from 1 to n
collect (let ((i-str (number-to-string i)))
(cond
((= (% i 3) 0)
(concat i-str "!"))
((string-match-p "3" i-str)
(concat i-str "!"))
(t i-str)))))
#!/usr/bin/env bash
TABLES="table1 table2 table3"
str=$(IFS=' '; for x in $TABLES; do printf " -t %s" "$x"; done)
echo "$str"
#=> -t table1 -t table2 -t table3
#!/usr/bin/env bash
set -eu
# set -x
# shellcheck source=env.sh
. env.sh
mkdir -p $OUTPUT_DIR
echo "DROP DATABASE IF EXISTS $DBNAME;" | psql --username="$USERNAME" -h "$HOST" template1
rem 毎回開くシナリオ、エビデンスのファイルを設定
set filename1=テストシナリオ.xlsx
set filename2=エビデンス.xlsx
rem 毎回開くフォルダを設定
set scenario_folder=W:\scenario_folder\
set evidence_folder=Z:\evidence_folder\
rem ファイルパスを設定
set scenario_path=%scenario_folder%%filename1%