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 / spotify_api.md
Last active March 22, 2019 01:48
spotify_api

preparation

$ mkdir spotifyapi (whatever you want)
$ cd spotifyapi
$ npm init -y
$ npm install spotify-web-api-node --save

app.js

@koji
koji / cron_task.md
Last active February 16, 2019 20:28
cron

create shellscript

$ mkdir TakePhotos
$ cd TakePhotos
$ vim runCamera.sh

install fswebcam

$ sudo apt-get install fswebcam
@koji
koji / nodejs_file_size.md
Created January 30, 2019 21:25
get file size with nodejs

get file size

const fs = require('fs');
const stat = fs.statSync("file path");
console.log(stat.size);
@koji
koji / runway_osc_test.md
Last active January 20, 2019 07:27
runway osc test

runway(v0.1.4) settings
input camera
output osc

ofApp.h

#pragma once

#include "ofMain.h"
#include "ofxOsc.h"
@koji
koji / install_ccmake.md
Created December 28, 2018 19:45
install ccmake on ubuntu

18.04_LTS

sudo apt install cmake-curses-gui
@koji
koji / swap_ubuntu.md
Created December 26, 2018 18:51
swap file for ubuntu
$ sudo cat /proc/swaps
$ sudo mkdir /var/swap/
$ sudo dd if=/dev/zero of=/var/swap/swap0 bs=2M count=2048
  2M x 2048 = 4.3GB
$ sudo chmod 600 /var/swap/swap0
$ sudo mkswap /var/swap/swap0
$ sudo swapon /var/swap/swap0
$ sudo vim /etc/fstab
add: /var/swap/swap0 swap swap defaults 0 0
@koji
koji / install_opencv_on_ubuntu.md
Last active December 24, 2018 21:35
install opencv on ubuntu
sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu bionic-security main"
sudo apt-get -y install build-essential checkinstall cmake unzip pkg-config yasm
sudo apt-get -y install git gfortran python3-dev
sudo apt-get -y install libjpeg8-dev libjasper-dev libpng12-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine2-dev libv4l-dev
sudo apt-get -y install libjpeg-dev libpng-dev libtiff-dev libtbb-dev
sudo apt-get -y install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libatlas-base-dev libxvidcore-dev libx264-dev libgtk-3-dev

# download opencv source code version 3.4.4
cd
@koji
koji / install_ros_on_ubuntu.md
Last active December 24, 2018 17:36
install ROS
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
sudo apt-get -y update
sudo apt-get -y upgrade

sudo apt-get -y install ros-kinetic-desktop-full
apt-cache search ros-kinetic

sudo rosdep init
@koji
koji / librealsense_install_on_ubuntu.md
Last active December 24, 2018 16:17
For installing librealsense from source code on Ubuntu
$ sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
$ sudo apt-get install --install-recommends linux-generic-lts-xenial xserver-xorg-core-lts-xenial xserver-xorg-lts-xenial xserver-xorg-video-all-lts-xenial xserver-xorg-input-all-lts-xenial libwayland-egl1-mesa-lts-xenial
$ sudo update-grub && sudo reboot
$ sudo apt-get install git libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev
$ sudo apt-get install libglfw3-dev (16)
@koji
koji / orc_setup.md
Created December 16, 2018 23:25
set up tesseract 4.0 on macOS

OCR_app

OCR App

Install Tesseract 4.0 on MacOS

$ brew install tesseract --HEAD
$ pip install pytesseract