Skip to content

Instantly share code, notes, and snippets.

View koji's full-sized avatar
🔍
I may be slow to respond.

koji koji

🔍
I may be slow to respond.
View GitHub Profile
@koji
koji / hugo_basic_commands.md
Last active April 4, 2018 05:09
Hugo basic commands

Hugo Basic Commands

install hugo
$ brew install hugo

check the version of hugo
$ hugo version
Hugo Static Site Generator v0.38 darwin/amd64 BuildDate:
@koji
koji / raspi_monitor.md
Created April 9, 2018 05:41
rotate raspi monitor
$ sudo vim /boot/config.txt

180 degree add the following line
lcd_rotate=2

reboot
$ sudo reboot
@koji
koji / generate_electron_app.md
Last active April 17, 2018 04:09
easiest way to generate an Electron app
install generator
$ npm install --global yo generator-electron

make a folder for an app
$ mkdir AppName

generate an Electron app
$ yo electron

sphere.frag

uniform float u_time;
uniform vec2  u_mouse;
uniform vec2  u_resolution;

const float PI = 3.14159265;
const float angle = 60.0;
const float fov = angle * 0.5 * PI / 180.0;
@koji
koji / note_ Colaboratory.md
Last active May 2, 2018 23:13
Note for Colaboratory

file uploader

from google.colab import files
files.upload()

using google drive

install a library
@koji
koji / sound_recording_pi.md
Created June 22, 2018 19:35
sound recording with raspberry pi3
$ lsusb

Bus 001 Device 004: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
Bus 001 Device 005: ID 045e:0745 Microsoft Corp. Nano Transceiver v1.0 for Bluetooth
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

$ arecord -l
@koji
koji / pi-and-nginx.md
Last active May 1, 2019 00:31
raspberry pi and nginx
check version
$ cat /etc/debian_version
$ apt-get update
$ apt-get -y install nginx
$ apt-get -y install uwsgi-plugin-python3
@koji
koji / my_vimrc.md
Created July 17, 2018 20:13
basic vim settings
"#### settings ####
set number " display line numbers
set title
syntax on
set tabstop=4
set shiftwidth=4
set noswapfile

"set matchpairs& matchpairs+=<:>
@koji
koji / install_utuntu_wiht_vagrant.md
Last active July 21, 2018 23:44
setup ubuntu for machine learning with vagrant

In this case, I'm using cmder.
Windows machine has Virtual box and vagrant.

setup vagrant

$ vagrant box add ubuntu/trusty64
$ vagrant init ubuntu/trusty64
$ vagrant up
@koji
koji / pip_install_error.md
Created July 22, 2018 17:38
pip install error
$ pip install something
Command "python setup.py egg_info" failed with error code 1

$ sudo pip install --upgrade setuptools