Skip to content

Instantly share code, notes, and snippets.

View fishkingsin's full-sized avatar
🦾

James Kong fishkingsin

🦾
View GitHub Profile
@fishkingsin
fishkingsin / Ripple.h
Created November 26, 2016 07:08
Arduino NeoMatrix Ripple Example on Teensy 3.6
#define Ripple_h
#ifdef Ripple_h
class Ripple {
public:
Ripple() {
xRes = 32;
yRes = 32;
r0 = new float*[xRes];
r1 = new float*[xRes];
r2 = new float*[xRes];
--Select from where you will pick up the pages files
set theFolder to choose folder with prompt "Select folder with original pages files :"
--Do it
tell application "Finder"
set theNames to name of files of theFolder ¬
whose name extension is "pages"
end tell
--Select where the PDF files will go
set pdf_Folder to choose folder with prompt "Select folder where PDF files will go :"
export MAKEFLAGS="-j 16 CXX=/usr/lib/distcc/arm-linux-gnueabihf-g++ CC=/usr/lib/distcc/arm-linux-gnueabihf-gcc"
@fishkingsin
fishkingsin / add_key.ssh
Created September 17, 2016 09:59
added auth key to server
cat ~/.ssh/id_rsa.pub | ssh [email protected] 'cat >> .ssh/authorized_keys'
@fishkingsin
fishkingsin / remove_exclude.sh
Created September 11, 2016 04:52
remove_exclude.sh
ls | grep -v 'config\|data' | xargs rm -rf
@fishkingsin
fishkingsin / BUCK
Created August 31, 2016 09:46
buck build latest version config
android_binary(
name = 'app',
manifest_entries = {
'version_code': 12,
'version_name': '2.0',
'min_sdk_version': 8,
'target_sdk_version': 23,
'debug_mode': True,
},
manifest = 'AndroidManifest.xml',
adb shell
su
mount -o remount,rw /system
#remove apk from system partition
rm system/priv-app/amlauncher.apk <
@fishkingsin
fishkingsin / build.sh
Created July 25, 2016 08:05
script to build ffmpeg and x264 for android
#!/bin/bash
#
# Author: Renato L. F. Cunha <[email protected]>
# This file is available according to the MIT license. Please refer to the
# LICENSE file for details.
#
# This script builds a version of FFmpeg with h.264 support enabled by means of
# the libx264 library.
#
@fishkingsin
fishkingsin / image-pov.py
Created July 16, 2016 11:10
APA102_Pi image pov
#!/usr/bin/python
# Persistence-of-vision (POV) example for Adafruit Dot Star RGB LED strip.
# Loads image, displays column-at-a-time on LEDs at very high speed,
# suitable for naked-eye illusions.
# See strandtest.py for a much simpler example script.
# See image-paint.py for a slightly simpler light painting example.
import Image
# from dotstar import Adafruit_DotStar
@fishkingsin
fishkingsin / image-pov.py
Last active June 1, 2016 15:10
fadecandy image pov python script
#!/usr/bin/env python
# Light each LED in sequence, and repeat.
import Image
import opc, time
import atexit
import random
"""
This program sends 10 random values between 0.0 and 1.0 to the /filter address,
waiting for 1 seconds between each value.