Skip to content

Instantly share code, notes, and snippets.

James Kong fishkingsin

Block or report user

Report or block fishkingsin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ImageProcessingTask.java
package com.creedon.Nixplay;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.AsyncTask;
import android.support.media.ExifInterface;
import android.util.Log;
@fishkingsin
fishkingsin / parser.fish
Created Feb 21, 2019
parse pod from folder
View parser.fish
function paresPod
for i in (find . -name "*.podspec")
echo "pod" "'"(basename "$i" ".podpsec")"'" ", :path =>" "'"(dirname "$i")"'",
end
end
View RetainCycle.swift
import UIKit
/*
class Person {
let name: String
init(name: String) {
self.name = name
}
@fishkingsin
fishkingsin / generator2.sh
Last active Feb 13, 2019
I want to gen a template images for testing, here this is
View generator2.sh
doit() {
echo $PWD
if test -e $1.jpg ; then
echo "already created $1"
else
echo Doing it for $1
convert -size 400x400 plasma:fractal -blur 0x10 \
tile_diag_source$1.jpg
@fishkingsin
fishkingsin / README.md
Created Aug 20, 2018 — forked from Ehesp/README.md
React Native ViewPager (Android + iOS with extras)
View README.md

ViewPager

A ViewPager for Android & iOS. It also has handy features implemented to handle common use-case scenarios.

Basic Usage

const views = [
  <View><Text>View 1</Text></View>,
  <View><Text>View 2</Text></View>,
@fishkingsin
fishkingsin / RNMultipleTargetsInstructions.md
Last active Jun 6, 2018 — forked from jacks205/RNMultipleTargetsInstructions.md
Settings up multiple app targets in React-Native
View RNMultipleTargetsInstructions.md
@fishkingsin
fishkingsin / generator.sh
Last active Oct 19, 2018
gen dummy image iwth difference pattern
View generator.sh
for i in $(seq $1 $2)
do
if test -e $i.jpg ; then
echo "already created $i"
else
convert -size 50x50 xc: +noise Random -virtual-pixel Tile -blur 0x5 \
-auto-level -separate -background white \
-compose ModulusAdd -flatten -channel G -combine +channel \
-set colorspace HSB -colorspace RGB tile_diag_source.jpg
View generate_images.fish
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 Feb 22, 2017
25 Android libraries you definitely want to try out in early 2017
View 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
View LaserSysControl.ino
//以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;
You can’t perform that action at this time.