Skip to content

Instantly share code, notes, and snippets.

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

Koji Kanao koji

🔍
I may be slow to respond.
View GitHub Profile
@koji
koji / serialtest.js
Created December 9, 2017 03:20
nodejs send data to arduino
const SerialPort = require('serialport');
const port = new SerialPort('/dev/cu.usbmodem****', {
parser: SerialPort.parsers.readline('\n'),
baudrate: 9600
})
port.on('open', function () {
console.log('Serial open.');
})
@koji
koji / bluetoothctl.py
Last active December 20, 2017 18:06 — forked from egorf/bluetoothctl.py
Bluetoothctl wrapper in Python
# ReachView code is placed under the GPL license.
# Written by Egor Fedorov ([email protected])
# Copyright (c) 2015, Emlid Limited
# All rights reserved.
# If you are interested in using ReachView code as a part of a
# closed source project, please contact Emlid Limited ([email protected]).
# This file is part of ReachView.
@koji
koji / kivy_install.md
Last active November 26, 2017 22:33
Install Error kivy

Env
Mac 10.12.6
Python 3.5.4(Anaconda)

$ pip install Cython==0.23
$ pip install kivy

Failed building wheel for kivy
@koji
koji / trying_darkflow.md
Last active November 18, 2017 02:30
trying darkflow pretrained model
@koji
koji / mongo_error.md
Created November 1, 2017 20:48
mongodb erro
$ mongo
MongoDB shell version v3.4.6
connecting to: mongodb://127.0.0.1:27017
2017-07-13T13:29:20.917+0500 W NETWORK  [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2017-07-13T13:29:20.917+0500 E QUERY    [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:237:13
@(connect):1:6
exception: connect failed
@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}",