Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Kotaro Ichihara ichihara-3

🏠
Working from home
View GitHub Profile
@ichihara-3
ichihara-3 / rollingcat.sh
Last active Sep 19, 2019
rolling longcat. mattn/longcat must be installed: https://github.com/mattn/longcat
View rollingcat.sh
#!/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
View compile vim with ubuntu18.04 python, ruby, lua support
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 Oct 12, 2018
to check the results of sha256() in hashlib and pycrypto are same
View compare_sha256.py
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 Jul 3, 2018
Install Vim 8 with Python, Python 3, Ruby and Lua support on Ubuntu 16.04 in ec2
View gist:e96df95c5570119559fe6212d15bfa0b
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
You can’t perform that action at this time.