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
(define (atom? x)
(and (not (null? x))
(not (pair? x))))
(define (append a b)
(cond ((null? a) b)
(else (cons (car a) (append (cdr a) b)))))
(define (linearize x)
(cond ((null? x) '())
@orleika
orleika / Browser_environment_on_Node.js
Last active July 27, 2016 05:45
Running Browser environment on Node.js
## Requirements
Python
`$ npm install -g phantomjs`
`$ npm install -g casperjs`
## Run
`$ casperjs index.js`
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Fix x-y-header table</title>
<style>
.view-table {
overflow: scroll;
width: 600px;
ascii -> hex(little endian)
echo "/bin/sh" | rev | xxd -p | sed 's/.\{2\}$//' | fold -s8 | sed 's/^\(.*\)/0x\1/g'
hex format
echo "68732f6e69622f" | sed 's/^0x\(.*\)$/\1/g' | fold -s2 | perl -pe 's/(\w{2})\s+/\\x\1/g'
@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の初期設定)
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
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;
}
}
@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"`

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 / 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.