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 / git_init.md
Created October 27, 2017 10:57
Alias for creating .ignore file when hit git init
$ vim .bashrc/.zshrc
alias ignore='echo -e "node_modules/ \n*.mp4 \n*.mp3 \n*.mov \n*.pdf \nconfig.js" >> .gitignore'

$ git init & ignore
@koji
koji / install_pygame_with_pip.md
Created September 11, 2017 10:09
How to avoid an error when try to install pygame
$ brew install sdl sdl_image sdl_mixer sdl_ttf portmidi
$ pip install pygame
@koji
koji / apache-spark.md
Created August 19, 2017 02:31
Create an environment for Apache-Spark
$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.12.6
BuildVersion:	16G29

Install java & apache-spark

@koji
koji / launch.json
Last active July 4, 2017 14:54
launch.json for Nativescript
```json
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch on iOS Emulator",
"type": "nativescript",
"platform": "ios",
"request": "launch",
"appRoot": "${workspaceRoot}",
@koji
koji / install_pyenv_on_raspberrypi.md
Last active August 2, 2017 20:43
install pyenv on raspberry pi
$ sudo apt-get install git python-pip make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev
$ sudo pip install virtualenvwrapper

$ git clone https://github.com/yyuu/pyenv.git ~/.pyenv
$ git clone https://github.com/yyuu/pyenv-virtualenvwrapper.git ~/.pyenv/plugins/pyenv-virtualenvwrapper

$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(pyenv init -)"' >> ~/.bashrc
@koji
koji / vertex.pde
Created June 28, 2017 04:43
vertex
size( 500, 500 );
background(255);
noStroke();
beginShape();
fill(0);
vertex( 100, 100 );
bezierVertex(100,100,150,200,90,300);
@koji
koji / openFrameworks with camera
Created June 12, 2017 02:31
openFrameworks_camera.cpp
//--------------------------------------------------------------
void ofApp::setup(){
ofSetFrameRate(60);
ofBackground(0);
// capture size
myVideo.initGrabber(640,480, true);
}
In file included from /usr/include/stdio.h:27:0,
                 from ../../../libgcc/../gcc/tsystem.h:87,
                 from ../../../libgcc/libgcc2.c:27:
/usr/include/features.h:364:25: fatal error: sys/cdefs.h: No such file or directory
compilation terminated.
Makefile:466: recipe for target '_muldi3.o' failed
make[2]: *** [_muldi3.o] Error 1
make[2]: Leaving directory '/root/Downloads/gcc-5.4.0/build/armv7l-unknown-linux-gnueabihf/libgcc'
Makefile:13268: recipe for target 'all-target-libgcc' failed
@koji
koji / python_calc.py
Last active May 25, 2017 01:59
python_calc created by sleepy-maker - https://repl.it/IQ0d/3
from decimal import *
print(Decimal('0.1') + Decimal('0.1') + Decimal('0.1'))
print(0.1 + 0.1 + 0.1)
myHope = input('what do you want to do during the summer?')
print('you want to ' + myHope + '. Nice!')
a = 3
b = 5
print('a+b=' + str(a+b))