Skip to content

Instantly share code, notes, and snippets.

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

Koki Yasuda orleika

🏠
Working from home
  • HackathonMonster
  • Tokyo, Japan
View GitHub Profile
@orleika
orleika / CSV.php
Last active September 19, 2017 10:13
csv file utilities with laravel
<?php
namespace App\Http\Middleware;
use Response;
use Exception;
class CSV
{
/**
* downlaod csv file
@orleika
orleika / fs_readFile_promise.js
Created August 24, 2017 04:08
wrap nodejs fs#readFile to be a promise
const readFile = (...args) => {
return new Promise((resolve, reject) => {
fs.readFile(...args, (err, data) => {
if (err) reject(err)
resolve(data)
})
})
}
@orleika
orleika / statistical_identify_bfs_nr_parallel.ipynb
Created August 15, 2017 02:24
BFS&ipyparallelによる統計的識別手法の最良組み合わせ抽出
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@orleika
orleika / statistical_identify_parallel.ipynb
Created August 10, 2017 14:58
Jupyter Notebookで並列計算
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@orleika
orleika / statistical_identify_dfs.ipynb
Last active December 24, 2017 05:24
DFS(枝刈り込み)による統計的識別手法の最良組み合わせ抽出
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am orleika on github.
  • I am orleika (https://keybase.io/orleika) on keybase.
  • I have a public key whose fingerprint is 1007 C011 3893 0FCA 6DED 1D82 26D7 5F1F C7EB D852

To claim this, I am signing this object:

@orleika
orleika / tor_ip_list.sh
Created March 6, 2017 14:46
Torの出口ノードのIPアドレス一覧
#!/bin/bash
tor_ip_list=`curl https://check.torproject.org/exit-addresses`
if [ $? -ne 0 ]; then
exit 1
fi
echo "${tor_ip_list}" | grep "ExitAddress" | while read line; do
ip=`echo "${line}" | sed -e "s/^ExitAddress \([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\).*/\1/g"`
sudo sh -c 'echo "127.0.0.1 localhost test" >> /etc/hosts' && sudo sh -c 'echo "127.0.0.1 localhost test" >> /etc/hosts' && sudo apt-get update && sudo apt-get install nginx -y && sudo sh -c 'echo {\"status\": \"OK\"} > /var/www/html/check.json' && sudo sh -c 'cat << EOS > /etc/nginx/sites-available/default
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
location / {
try_files \$uri \$uri.json \$uri/ =404;
}
}
docker run -it --rm -p 443:443 -p 80:80 --name certbot -v "/etc/letsencrypt:/etc/letsencrypt" -v "/var/lib/letsencrypt:/var/lib/letsencrypt" quay.io/letsencrypt/letsencrypt:latest certonly --text --agree-tos --email $email --rsa-key-size 4096 --renew-by-default -d $domain --verbose
@orleika
orleika / howto-gitlab-for-windows.md
Created August 17, 2016 07:54
WindowでのGit導入法

WindowでのGit導入法

Git導入編

  1. https://git-scm.com からDownloads for Window
  2. 設定を変える必要はないのでそのままインストール
  3. (何もないところで)右クリックで開くメニューからGit Bashを開く
  4. 次のコマンドを実行(Gitの初期設定)