Skip to content

Instantly share code, notes, and snippets.

View revskill10's full-sized avatar
🎯
Focusing

Truong Hoang Dung revskill10

🎯
Focusing
  • Freelancer
  • Haiphong, Vietnam
View GitHub Profile
require 'rubygems'
require 'sinatra'
require 'fileutils'
# upload with:
# curl -v -F "data=@/path/to/filename" http://localhost:4567/user/filename
post '/:name/:filename' do
userdir = File.join("files", params[:name])
@revskill10
revskill10 / main.cs
Created July 12, 2014 15:47
Event style of FizzBuzz
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
@revskill10
revskill10 / main.cpp
Created September 30, 2014 08:50
Draw image using Marmalade
// Marmalade headers
#include "s3e.h"
#include "Iw2D.h"
int main()
{
// Initialise the 2D graphics system
Iw2DInit();
@revskill10
revskill10 / index.ios.js
Created April 5, 2015 18:06
TextInput bug
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
{
"name": "my-app",
"version": "0.0.0",
"dependencies": {
"browserify": "~2.36.1",
"less": "~1.5.1"
},
"devDependencies": {
"watchify": "~0.4.1",
"catw": "~0.2.0"
#import <Foundation/Foundation.h>
#import "RCTBridgeModule.h"
#define RCT_EXTERN_MODULE(objc_name, objc_supername) \
RCT_EXTERN_REMAP_MODULE(objc_name, objc_name, objc_supername)
#define RCT_EXTERN_REMAP_MODULE(js_name, objc_name, objc_supername) \
objc_name : objc_supername \
@end \
@interface objc_name (RCTExternModule) <RCTBridgeModule> \
OS X - This repo only contains the iOS implementation right now, and Xcode only runs on Mac.
New to Xcode? Download it from the Mac App Store.
Homebrew is the recommended way to install node, watchman, and flow.
brew install node.
brew install --HEAD watchman. We recommend installing watchman, otherwise you might hit a node file watching bug.
brew install flow. If you want to use flow.
@revskill10
revskill10 / rails_stripe
Created May 15, 2015 10:05
stripe with rails
https://stripe-three-way-payment.herokuapp.com/
@revskill10
revskill10 / react-art
Created May 24, 2015 19:47
react-art
http://jsfiddle.net/JMZc5/1/