Skip to content

Instantly share code, notes, and snippets.

View doublerebel's full-sized avatar

Charles Phillips doublerebel

View GitHub Profile
@jessearmand
jessearmand / mpParse.m
Created November 23, 2010 13:59
A command line tool to parse .mobileprovision file
//
// © 2008 Eugene Solodovnykov
// http://idevblog.info/mobileprovision-files-structure-and-reading/
//
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
@oroce
oroce / _for iOS users
Created November 2, 2011 18:20
Appcelerator share to native facebook, twitter
This gist is only for Android.
If you would like launch native apps
on iPhone, iPad, you can find information about it in Appcelerator Docs:
-https://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Platform.canOpenURL-method.html
-https://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Platform.openURL-method.html
More info about iOS URL Schemes: http://handleopenurl.com/
@tzmartin
tzmartin / gist:1372475
Created November 17, 2011 05:53
UIModule Error Hack
/*
* This is a hack solves the "Invalid method passed to UIModule" error
* It works by forcing Titanium to load SDK components into memory.
*
* Drop this file anywhere in your project and DON'T Ti.include() it.
* Be sure this file extension is .js.
* Clean and recompile your project.
*
* Enjoy!
* @tzmartin
@3rd-Eden
3rd-Eden / remote.js
Created February 4, 2012 22:32
Uniform remote address interface for Node.js
var http = require('http')
, request = http.IncomingMessage.prototype;
/**
* Add a uniform interface for remote address in Node.js
*
* @api private
*/
request.__defineGetter__('remote', function remote () {
@dbainbridge
dbainbridge / sessionsStringFix.js
Created April 3, 2012 00:48
node-inspector full string output fix
// Replace refToObject in node-inspector's lib/sessions.js file to get rid of the 80 character limit on strings outputted from the console or tool tip.
// The Scope Variables panel will still show maximum of 80 characters along with the "(length: x)" suffix
function refToObject(ref) {
var desc = '',
name,
kids = ref.properties ? ref.properties.length : false;
switch (ref.type) {
case 'object':
name = /#<an?\s(\w+)>/.exec(ref.text);
@trey
trey / happy_git_on_osx.md
Last active February 18, 2024 10:46
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@19h
19h / TiYoutube.js
Last active November 11, 2015 16:24
Titanium Mobile SDK iPhone / Android: Extract Youtube Video URL / URI from video-id / identification / name and play mp4 file. (Workaround for the recent change of security in Youtube)
Titanium.App.addEventListener("playvideo", function (e) {
var win11 = Titanium.UI.createWindow({
orientationModes: [Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT],
title: "Video",
zIndex: 222222
});
var activeMovie = Titanium.Media.createVideoPlayer({
fullscreen: !0,
autoplay: !0,
@aaronfeng
aaronfeng / etc-nginx-nginx.conf
Created July 30, 2012 14:15
nginx json log format
# /etc/nginx/nginx.conf
log_format main '{'
'"remote_addr": "$remote_addr",'
'"remote_user": "$remote_user",'
'"time_local": "$time_local",'
'"request": "$request",'
'"status": "$status",'
'"body_bytes_sent": "$body_bytes_sent",'
'"http_referer": "$http_referer",'
@Arood
Arood / images2android.sh
Created October 10, 2012 18:11
Convert iPhone-resources to Android (for Titanium)
type mogrify >/dev/null 2>&1 || { echo >&2 "» This script requires mogrify. Please install ImageMagick first!"; exit 1; }
rm -rf Resources/android/images
mkdir Resources/android/images
mkdir Resources/android/images/res-xhdpi
mkdir Resources/android/images/res-mdpi
echo " » Copying the splash screen"
cp Resources/iphone/Default.png Resources/android/images/res-mdpi/default.png
cp Resources/iphone/Default@2x.png Resources/android/images/res-xhdpi/default.png
@animecyc
animecyc / event.js
Created November 15, 2012 17:59
Titanium Event Management
/*global Ti*/
var _ = require('/application/shared/lib/underscore'); // needs underscore
exports.attach = function (proxy, to_attach, named, prefix) {
'use strict';
var reservedEvents = ['pause', 'paused', 'resume', 'resumed', 'orientationchange'];
if (proxy && _.size(to_attach)) {