Skip to content

Instantly share code, notes, and snippets.

View fishkingsin's full-sized avatar
🦾

James Kong fishkingsin

🦾
View GitHub Profile
@fishkingsin
fishkingsin / generate_images.fish
Created September 19, 2017 07:54
generate images
for i in (seq 10000)
if test -e $i.jpg
echo "already created $i"
else
echo create $i
convert -background lightgray -fill black -size 2458x1536 -pointsize 720 -gravity center label:$i $i.jpg
end
end
@fishkingsin
fishkingsin / 25 Android libraries you definitely want to try out in early 2017
Created February 22, 2017 02:06
25 Android libraries you definitely want to try out in early 2017
https://medium.freecodecamp.com/25-new-android-libraries-which-you-definitely-want-to-try-at-the-beginning-of-2017-45878d5408c0#.y5jdyvzi5
//以15毫秒一步的速度转动
#include <Servo.h>
Servo servo1; // 建立Servo实例
Servo servo2;
const int servo1Pin = 8; // servo1 接 Pin 8
const int servo2Pin = 9; // servo2 接 Pin 9
const int laserPin = 10;
const int every1 = 15;
const int every2 = 15;
find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID`
adb devices | grep 'device' | grep -v 'List of devices attached' | cut -f 1 | xargs -n 1 bash -c 'ionic run android -- $0'

Keybase proof

I hereby claim:

  • I am fishkingsin on github.
  • I am fishkingsin (https://keybase.io/fishkingsin) on keybase.
  • I have a public key ASDey5b7WoxFCv5n6S6UvFN-bi91v09PxTQWZBnOmEcMJwo

To claim this, I am signing this object:

@fishkingsin
fishkingsin / Ripple.h
Last active September 6, 2017 18:55
matrix 8x8 example
#define Ripple_h
#ifdef Ripple_h
class Ripple {
public:
unsigned char GAMMA[256];
Ripple() {
xRes = 32;
yRes = 32;
r0 = new float*[xRes];
@fishkingsin
fishkingsin / Ripple.h
Last active February 13, 2017 11:41
16 16 matrix example
#define Ripple_h
#ifdef Ripple_h
class Ripple {
public:
unsigned char GAMMA[256];
Ripple() {
xRes = 16;
yRes = 16;
r0 = new float*[xRes];
convert original.jpg -crop 1458x1944+618-0 \
-gravity north -extent 1658x2144 \
-gravity south -extent 1658x2244 \
-resize 1200x1800 \
frame.png -repage 1658x2244+0+0 \
-background dodgerblue -layers merge +repage final.png
@fishkingsin
fishkingsin / 01__Switch_Fountain_Test.js
Created November 28, 2016 03:59
mqtt list version for specific app
var Thread = Java.type("java.lang.Thread");
function execute(action) {
out("Test Script: " + action.getName());
amCameraServiceVersion("AE36784109B1")
amCameraServiceVersion("7603051C2B1C")
amCameraServiceVersion("001519FFF922")
amCameraServiceVersion("001519FFF96A")
amCameraServiceVersion("001519FFF95E")
amCameraServiceVersion("001519FFF94F")