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 / gen-secret.txt
Created January 17, 2016 08:24
Randomly generate string text secret
ruby -rsecurerandom -e 'puts SecureRandom.hex(20)'
@haxpor
haxpor / Update-text-3-zombiehero.txt
Created January 24, 2016 13:38
Update text #3 of Zombie Hero : Revenge of Kiki on iOS platform
Big updates for you guys!
We have 2 new modes, full gamepad support, iCloud enabled, along with several improvement, and bug fixes.
** 2 New Modes **
- Zombie Apocalypse
Fight against huge amount of zombies in each different type. Try to get the highest score and share it on Facebook or Twitter. Show off your friends!
You have only one chance to revive for each gameplay.
- Challenge Mode
/start - Greeting with users, show them some basic info of what bot can do, and list of commands.
/stop - End the conversation, just say good bye, and start it over.
/help - Show very brief info of what bot can do, and list of commands.
/getname - Return name of the author, in this case "Wasin Thonkaew". Of course :)
/getnickname - Return nickname of the author.
/getsocial - Return the list of social channels that author has and users can check them out.
/getfreelancingrate - Return freelancing rate of the author.
/getcurrentlocation - Return the current location of the author.
/getproductsmade - Return the list of products that author has made.
/getlistofclients - Return the list of clients.
@haxpor
haxpor / instruction.txt
Created February 28, 2016 22:18
Instruction to install pecl on Mac OSX. Found here http://stackoverflow.com/a/34536398/571227.
The following instructions install PEAR and PECL on Mac OS X under /usr/local/. PECL is bundled with PEAR. So this is as simple as installing PEAR on Mac OS X.
PEAR is PHP’s Package Repository and makes it easy to download and install PHP tools like PHPUnit and XDebug. I specifically recommend these two for every PHP developer.
Download PEAR
curl -O http://pear.php.net/go-pear.phar
sudo php -d detect_unicode=0 go-pear.phar
Configure and Install PEAR
You should now be at a prompt to configure PEAR.
@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 / scriptName.php
Last active February 6, 2018 23:01 — forked from prime31/gist:5675017
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just execute `php scriptName.php`
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
// set only for one for safety
$registrationId = 'YOUR-REGISTRATION-ID-GOES-HERE';
// prep the bundle
$msg = array
(
  • list packages adb shell pm list packages -f
  • delegate package adb shell am start -a android.intent.action.DELETE -d package: