Skip to content

Instantly share code, notes, and snippets.

View kairyu's full-sized avatar

Kai Ryu kairyu

View GitHub Profile
import time
import random
from flask import Flask, Response, stream_with_context
app = Flask(__name__)
head = """
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
"""
import time
import random
from flask import Flask, Response, stream_with_context
app = Flask(__name__)
head = """
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
"""
@kairyu
kairyu / mu.py
Last active October 11, 2018 03:30
import time
import random
from flask import Flask, Response, stream_with_context
app = Flask(__name__)
script = """
<script>
function insert(data) {
var item = document.createElement('div');
@kairyu
kairyu / gist:ef9decdd3c35d3e5e318c735b755f279
Last active November 18, 2019 02:23
Compile Vim 7.4 on Cygwin
apt-cyg install make automake gcc-core gcc-g++ python python3 ruby-devel lua-devel tcl-devel libncurses-devel libiconv-devel cscope
./configure --with-features=huge \
--enable-multibyte \
--enable-rubyinterp \
--enable-pythoninterp \
--with-python-config-dir=/usr/lib/python2.7/config \
--enable-python3interp \
--with-python3-config-dir=/usr/lib/python3.4/config-3.4m \
--enable-perlinterp \
--enable-luainterp \
autossh -M 20000 -fCND 1080 <server>
@kairyu
kairyu / gist:26f634053d2683aa762d
Created March 7, 2016 02:48
Replace mixed newline with DOS newline
find -name *.c -or -name *.h | xargs perl -pei 's/[^\r]\n/\r\n/'
@kairyu
kairyu / generate_csr
Created April 16, 2015 03:34
Generate a CSR with OpenSSL
openssl req -new -newkey rsa:4096 -nodes -out www_example_com.csr -keyout www_example_com.key -subj "/C=JP/ST=/L=/O=/CN=www.example.com"