Skip to content

Instantly share code, notes, and snippets.

View haxpor's full-sized avatar
Some of my financial tools

Wasin Thonkaew haxpor

Some of my financial tools
View GitHub Profile
View UnityViewControllerBase.h
#pragma once
@class UnityView;
@interface UnityViewControllerBase : UIViewController
- (BOOL)shouldAutorotate;
- (BOOL)prefersStatusBarHidden;
View UnityNativeInterface.m
// UnityNativeInterface.m
// Unity-iPhone
// Created by Sam Izzo on 30/05/14.
#import "UnityInterface.h"
#import "UnityNativeInterface.h"
haxpor /
Last active August 29, 2015 13:57
Converter to .caf from .wav in the current folder, nice export for ios game
# This script is for converting sound files into .caf (for sfx)
for i in *.wav; do
afconvert -f caff -d LEI16@22050 -c 1 "$i"
# create a new folder then move newly exported into it
mkdir caf
haxpor / batchLayerTranslate.jsx
Created May 11, 2015 08:55
Batch translate layer in images residing in a folder for fixed x, and y amount. It will open each image file, then translate, then save the change replacing the file. If translating the layer outside of the image area, photoshop will interrupt and ask you whether or not to save. You can still continue to save manually. But make sure to select to…
View batchLayerTranslate.jsx
var inputFolder = Folder.selectDialog ("Select a folder to process");
var fileList = inputFolder.getFiles("*.png");
for(var i=0; i<fileList.length; i++) {
backFile = app.activeDocument;
haxpor /
Last active August 29, 2015 14:21
Export Xcode's archive file to .ipa, and sign it with the proper code signing identity.
# Export .xcarchive file into .ipa and properly sign it with implied codesign identity
# Full credits to
# Set the parameters here
provisioningProfileName="Journalists inhouse"
# Export into .ipa file
echo "-- Exporting into .ipa --"
haxpor /
Created July 4, 2015 03:30
Change xcode path
xcode-select -s /Applications/
haxpor / .tmux.conf
Created July 7, 2015 20:35
tmux config
View .tmux.conf
unbind C-b
set -g prefix C-'\'
bind C-'\' send-prefix
haxpor / gist:50c3ae54e69ebc6f87c8
Created September 29, 2015 10:10
Get the top UIWindow as seen in KLCPopup (
View gist:50c3ae54e69ebc6f87c8
// Prepare by adding to the top window.
NSEnumerator *frontToBackWindows = [[[UIApplication sharedApplication] windows] reverseObjectEnumerator];
for (UIWindow *window in frontToBackWindows) {
if (window.windowLevel == UIWindowLevelNormal) {
[window addSubview:self];
haxpor / ConstraintsInCode.m
Created September 29, 2015 12:24
Create iOS constraints in code
View ConstraintsInCode.m
UIView* contentView = [[UIView alloc] init];
contentView.translatesAutoresizingMaskIntoConstraints = NO;
contentView.backgroundColor = [UIColor grayColor];
contentView.layer.cornerRadius = 12.0;
UILabel* statusLabel = [[UILabel alloc] init];
statusLabel.translatesAutoresizingMaskIntoConstraints = NO;
statusLabel.backgroundColor = [UIColor clearColor];
statusLabel.textColor = [UIColor whiteColor];
haxpor / BELL-412-Model-Output.txt
Created April 30, 2012 16:40
BELL-412 Model Structure
View BELL-412-Model-Output.txt
-- Model Bone Information --
-Name: RootNode
Index: 0
-Name: BELL412
Index: 1
-Name: group
Index: 2
-Name: BELL412_Pop1
Index: 3
-Name: BELL412_Pop1_ncl1_1