Skip to content

Instantly share code, notes, and snippets.

View ichihara-3's full-sized avatar
🏠
Working from home

Kotaro Ichihara ichihara-3

🏠
Working from home
View GitHub Profile
@ichihara-3
ichihara-3 / rollingcat.sh
Last active September 19, 2019 12:48
rolling longcat. mattn/longcat must be installed: https://github.com/mattn/longcat
#!/bin/bash
# usage: ./rollingcat.sh INTERVAL TIMES
# mattn/longcat must be installed: https://github.com/mattn/longcat
if [[ $1 =~ ^[0-9]+(\.[0-9]+)?$ ]]; then
interval=$1
else
interval=1
fi
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
sudo apt install ruby
#Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt-get install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
@ichihara-3
ichihara-3 / compare_sha256.py
Created October 12, 2018 16:33
to check the results of sha256() in hashlib and pycrypto are same
from hashlib import sha256
from Crypto.Hash import SHA256
from os import urandom
count = 0
while True:
value = urandom(20)
crypt = SHA256.new()
crypt.update(value)
assert crypt.hexdigest() == sha256(value).hexdigest()
@ichihara-3
ichihara-3 / gist:e96df95c5570119559fe6212d15bfa0b
Last active July 3, 2018 11:38
Install Vim 8 with Python, Python 3, Ruby and Lua support on Ubuntu 16.04 in ec2
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
sudo apt install python2.7
sudo apt install ruby
sudo apt install libpython3.5-dev
#Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt-get install checkinstall