Skip to content

Instantly share code, notes, and snippets.

@masbog
masbog / installTagLib.sh
Created February 17, 2013 14:05
cara install TagLib di mac os (How To install TagLib on Mac OS)
$ cd ~/source
$ wget http://taglib.github.com/releases/taglib-1.8.tar.gz
$ tar -zxvf taglib-1.8.tar.gz
$ cd taglib-1.8
$ cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.6 \
-DCMAKE_OSX_ARCHITECTURES="i386;x86_64" \
-DENABLE_STATIC=ON \
-DCMAKE_INSTALL_PREFIX="/usr/local"
@masbog
masbog / dedup.py
Created February 18, 2013 09:07 — forked from plamere/dedup.py
#!/usr/bin/python
import sys
import os
import pprint
import subprocess
import pickle
import atexit
import simplejson as json
sys.path.insert(0, "../API")
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://npmjs.org/install.sh | sh
@masbog
masbog / gist:4978293
Created February 18, 2013 15:41
Install NodeJS on Centos 5.x
$ git clone https://github.com/joyent/node.git && cd node
# PYTHON=/usr/local/bin/python2.7
# export PYTHON
# python2.7 configure && make && make install
@masbog
masbog / dedup.py
Created February 18, 2013 17:34 — forked from plamere/dedup.py
#!/usr/bin/python
import sys
import os
import pprint
import subprocess
import pickle
import atexit
import simplejson as json
sys.path.insert(0, "../API")
@masbog
masbog / BootableUSB.txt
Last active December 13, 2015 22:39
Create Bootable USB on Mac OS
Open a Terminal (under Utilities)
Run
masbogs-MacBook-Pro:$diskutil list
and determine the device node assigned to your flash media (e.g. /dev/disk2)
Run
masbogs-MacBook-Pro:$diskutil unmountDisk /dev/diskN
(replace N with the disk number from the last command; in the previous example, N would be 2)
@masbog
masbog / install_perl.txt
Created February 21, 2013 05:23
How To install PERL on iOS (Jailbroken device)
pre-require (install on cydia)
1. OpenSSH
2. OpenSSL
3. wget
if pre-require above all installed
1. SSH your device with root user (default root password is alpine)
- ssh root@(your_device_ip)
2. go to /var/root/
- cd /var/root/
@masbog
masbog / macro_uicolor.m
Last active December 14, 2015 21:28
macro objective-c for fast generate [UIColor colorWithRed:r green:g blue:b alpha:a]
#define RGB(r, g, b) \
[UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]
#define RGBA(r, g, b, a) \
[UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]
@masbog
masbog / meta_geo.txt
Created March 22, 2013 21:02
No GPX No Problem
find the file .plist
here /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/System/Library/Frameworks/CoreLocation.framework/Support/SimulationScenarios
so u can read like this at Locations key objectAtIndex:0
Item0 | Data | <62706c69 73743030 d4010203 04050828 29542474 6f705824 6f626a65 63747358 24766572 73696f6e 59246172 63686976 6572d106 0754726f 6f748001 a3090a21 55246e75 6c6cdb0b 0c0d0e0f 10111213 14151617 18191a1b 1c1d1e1f 205f1026 6b434c4c 6f636174 696f6e43 6f64696e 674b6579 436f6f72 64696e61 74654c61 74697475 64655f10 246b434c 4c6f6361 74696f6e 436f6469 6e674b65 79566572 74696361 6c416363 75726163 795f101d 6b434c4c 6f636174 696f6e43 6f64696e 674b6579 54696d65 7374616d 705f1026 6b434c4c 6f636174 696f6e43 6f64696e 674b6579 486f7269 7a6f6e74 616c4163 63757261 63795f10 1c6b434c 4c6f6361 74696f6e 436f6469 6e674b65 794c6966 65737061 6e5f1027 6b434c4c 6f636174 696f6e43 6f64696e 674b6579 436f6f72 64696e61 74654c6f 6e676974 7564655f 101a6b43
@masbog
masbog / carbon_enum.txt
Created March 27, 2013 21:17
enum code keyboard Carbon.Framework enum Cocoa Mac
/*
* Summary:
* Virtual keycodes
*
* Discussion:
* These constants are the virtual keycodes defined originally in
* Inside Mac Volume V, pg. V-191. They identify physical keys on a
* keyboard. Those constants with "ANSI" in the name are labeled
* according to the key position on an ANSI-standard US keyboard.
* For example, kVK_ANSI_A indicates the virtual keycode for the key