Skip to content

Instantly share code, notes, and snippets.

View haxpor's full-sized avatar
🤓
Some of my financial tools https://www.mql5.com/en/users/haxpor/seller

Wasin Thonkaew haxpor

🤓
Some of my financial tools https://www.mql5.com/en/users/haxpor/seller
View GitHub Profile
@haxpor
haxpor / Makefile
Created June 3, 2016 12:02
Objc syntax and compilation makefile for quick and dirty check if everything alright before grabbing all the files to create a final library in XCode.
# Makefile to compile or check syntax of wrapper, and its tester class
CC=clang++
FRAMEWORKS=-framework Foundation
FRAMEWORKS+=-framework UIKit
FRAMEWORKS+=-framework SystemConfiguration
FRAMEWORKS+=-framework CoreMotion
FRAMEWORKS+=-framework CoreLocation
FRAMEWORKS+=-framework CoreGraphics
FRAMEWORKS+=-framework Security
@haxpor
haxpor / nicediff
Created June 30, 2016 05:36
Put this command in global git and execute it like "git nicediff branch1..branch2" to see difference between branch in nice format
[alias]
nicediff = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
@haxpor
haxpor / gist:70d60241a5b80cd8d794f8fccf6ecfb7
Last active July 11, 2016 08:19
Structure inside NSDictionary after receiving remote push notification in iOS
2016-07-11 15:17:36.144755 demoApp[1050:339273] userInfo: {
DataInfo = {
"client_id" = {
"$id" = 54b9bc8fbe120b4e478b47a1;
};
"site_id" = {
"$id" = 57834760be120bc8278b4577;
};
};
aps = {
@haxpor
haxpor / android-links.md
Last active July 22, 2016 18:03
Interesting links and technical stuff in day-to-day development
@haxpor
haxpor / engine_rulelist.cs
Created July 27, 2016 14:26
Demonstrate how to know reward to get if users execute such an action from engine rule
// call engine rule to get a list of rule info
// to get to know reward to get from executing such action on Engine api
EngineApi.RuleInfoList(Playbasis.Instance, "comment", "jontestuser",
delegate(List<RuleInfoVariant2> result, HttpError error) {
if (error == null) {
if (result != null) {
// loop through all rule
foreach (RuleInfoVariant2 ruleInfo in result)
{
@haxpor
haxpor / gist:9ec0a7ba145d717be041cfc9dd4dde63
Created August 20, 2016 09:14
Code to manually create UIWindow, and UIViewController with customized UIView without involving with Interface Builder
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
CGRect screenRect = [UIScreen mainScreen].bounds;
self.window = [[UIWindow alloc] initWithFrame:screenRect];
GLView *glView = [[GLView alloc] initWithFrame:screenRect];
UIViewController *rootVc = [[UIViewController alloc] init];
[rootVc.view addSubview:glView];
@haxpor
haxpor / README.md
Created August 20, 2016 19:20
itunes's receipt validator by

In App Purchase Receipt Validator - PHP

Host this on any box which is running PHP and has direct outbound web access and it will be able to validate iOS IAP receipts for you (Sandbox or Production environment configurable).

Feel free to use this code in anything you make, with the standard disclaimer that if it doesn't work / blows up the universe, you're on your own.

Alternatively, the latest version is hosted at: http://www.chrismaddern.com/validate-itunes-receipt/

This points to production.

@haxpor
haxpor / pbxproj-diff.txt
Last active October 26, 2016 13:02
Diff between 2 projects generated with ionic (rc-1) cli. The diff file is generated via diff comparing failed-project to success-project.
8d7
<
15a15,21
> 7AA484D8671B4F4FAD2BEFAA /* CDVLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F92630E181141039AA090FB /* CDVLogger.m */; };
> C09B4047D1DF43B88E365E5C /* CDVDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = E64DC7260FBA48608D8FD2FE /* CDVDevice.m */; };
> E3ADD04642B74603A7EE2AB0 /* NativeStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = AB9742C2704E405482736609 /* NativeStorage.m */; };
> FBD7F35D70D548328D3BC273 /* CDVSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 2991DB23B4884D6792BDC50F /* CDVSplashScreen.m */; };
> 4B80DF741B8148C1AC120FEC /* CDVViewController+SplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 5276D82FEB1341EB88B0BD64 /* CDVViewController+SplashScreen.m */; };
> BC93ABE0255D4DB28AECFD03 /* CDVStatusBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 14593FC73F464F68B07F8DC4 /* CDVStatusBar.m */; };
> 8F517527A4C446EB947AE5B2 /* IonicKeyboard.m in Sources */ = {isa = PBXBuildFile; fileRef = C406194DB33C4C679
@haxpor
haxpor / app.js
Last active November 9, 2016 17:34
Deeplink integrated with Branch.io with ionic 1 (sidemenu template)
// Ionic Starter App
// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
// 'starter.controllers' is found in controllers.js
angular.module('starter', ['ionic', 'starter.controllers', 'starter.openUrl'])
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {