Skip to content

Instantly share code, notes, and snippets.

@gre
gre / README.md
Last active August 22, 2016 15:51

This is a PoC that will be later a PR to react-native-view-snapshot to implement the feature for Android.

We still need to wait React Native to have the addUIBlock feature provided by this PR.

Also, I'll wait react-native-view-snapshot to implement the same API as the current RN takeSnapshot on iOS allowing the options.

Usage

import {NativeModules, findNodeHandle} from "react-native";
@remojansen
remojansen / class_decorator.ts
Last active July 30, 2025 05:53
TypeScript Decorators Examples
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
}
@RafaelOliveira
RafaelOliveira / gist:86ee9bde7f9b3921b955
Last active July 28, 2016 19:48
OpenFL native extensions for Mobile Apps
Battery Status:
Camera: https://github.com/bazzisoft-openfl-extensions/camera
Contacts:
Device Info: https://github.com/hyperfiction/HypSystem (not tested)
Device Motion (Accelerometer):
Device Orientation (Compass):
Geolocation:
Open Browser: https://github.com/bazzisoft-openfl-extensions/interop
Media Playback:
Media Capture:
@sebmarkbage
sebmarkbage / ReactCanvasDrawing.js
Created July 25, 2014 19:14
Canvas Drawing Example
/** @jsx React.DOM */
var Graphic = React.createClass({
componentDidMount: function() {
var context = this.getDOMNode().getContext('2d');
this.paint(context);
},
componentDidUpdate: function() {