Skip to content

Instantly share code, notes, and snippets.

View fishkingsin's full-sized avatar
✈️

James Kong fishkingsin

✈️
View GitHub Profile
@fishkingsin
fishkingsin / README.md
Created August 20, 2018 04:15 — forked from Ehesp/README.md
React Native ViewPager (Android + iOS with extras)

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 2,
@fishkingsin
fishkingsin / RNMultipleTargetsInstructions.md
Last active June 6, 2018 07:01 — forked from jacks205/RNMultipleTargetsInstructions.md
Settings up multiple app targets in React-Native
@fishkingsin
fishkingsin / example.py
Created January 31, 2016 13:47 — forked from taka-wang/example.py
install mosquitto 1.4 on raspberry pi
import paho.mqtt.client as mqtt
# The callback for when the client receives a CONNACK response from the server.
def on_connect(client, userdata, rc):
print("Connected with result code "+str(rc))
# Subscribing in on_connect() means that if we lose the connection and
# reconnect then subscriptions will be renewed.
client.subscribe("hello/world")
# The callback for when a PUBLISH message is received from the server.
@fishkingsin
fishkingsin / gist:8a3bca76709a263c8126
Created January 8, 2016 07:07 — forked from reidransom/gist:2630650
Timecode burn with ffmpeg
# Timecode burn with ffmpeg
# ffmpeg must be configured with --enable-libfreetype
# box=1 - tells ffmpeg to draw a box around the text
# boxcolor - format is 0xRRGGBB[AA]
ffmpeg -i video.mov -vcodec libx264 -cmp 22 -vf "drawtext=fontfile=DroidSansMono.ttf: timecode='09\:57\:00\:00': r=23.976: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000099" -y output.mov