Skip to content

Instantly share code, notes, and snippets.

View rolandoam's full-sized avatar

Rolando Abarca rolandoam

View GitHub Profile
@rolandoam
rolandoam / bbpress_xmlrpc.rb
Created June 8, 2009 00:08
testing xmlrpc on cocos2d forum
# xmlrpc is stdlib
require 'xmlrpc/client'
require 'pp'
user = "user"
pass = "mypass"
url = "http://www.cocos2d-iphone.com/forum/xmlrpc.php"
server = XMLRPC::Client.new2(url)
# note: this call works even if authentication fails!
@rolandoam
rolandoam / emailgateway.rb
Created June 9, 2009 16:44
cocos2d email gateway
#!/usr/bin/env ruby
# Copyright (c) 2009, Rolando Abarca M.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@rolandoam
rolandoam / GFFParallaxNode.h
Created December 14, 2009 16:22
GFFParallaxNode
//
// GFFParallaxNode.h
//
// Created by Rolando Abarca on 12/14/09.
//
#import <Foundation/Foundation.h>
#import "cocos2d.h"
#define MAX_PARALLAX_CHILDREN 25
@rolandoam
rolandoam / MultilineBitmapFontAtlas.m
Created April 28, 2010 14:32
multiline BitmapFontAtlas for Cocos2D-iPhone
/*
* adapted from http://www.cocos2d-iphone.org/forum/topic/207
*
* Returns a CCNode with the string. It splits on new lines and returns the length of the final node.
* The length parameter is there to know the final length of the node (pass nil if you don't need it).
*
*
* call it this way:
*
* int length;
#!/usr/bin/ruby
GROWLNOTIFY = "/Users/rolando/Applications/growlnotify"
ALERT_SOUND = "/Users/rolando/Documents/GFF/SFX/alert_35.wav"
class Fixnum
def minutes
self * 60
end
end
@rolandoam
rolandoam / gist:660109
Created November 2, 2010 18:58
entel redirection
The lovely people from Entel is listening on every request/socket you open on a
mobile device to see if it's doing something that resembles an HTTP request, if
so then it "discretely" redirects you to somewhere else:
Here's a log of an embedded device we're (DataDyne) building (these are the raw
AT commands)
== FIRST ATTEMPT ==
AT
OK
@rolandoam
rolandoam / SectionalMenu.h
Created November 4, 2010 18:42
SectionalMenu.h
#import <Foundation/Foundation.h>
#import "cocos2d.h"
@interface SectionalButton : CCSprite
{
id target_;
CCArray *selectors_;
CCArray *sections_;
CCArray *sectionsEnabled_;
CCArray *sectionsData_;
@rolandoam
rolandoam / glMatrix-0.9.5.js
Created September 28, 2011 16:26
glMatrix-0.9.5.js extern
/*
* Copyright 2011 Rolando Abarca.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@rolandoam
rolandoam / gist:2423749
Created April 19, 2012 19:56
git presentation

Agenda

  1. Overview of version control and git (15 mins)
  2. A sample git work flow (5 mins)
  3. Successful projects and their characteristics (5 mins)
  4. Recommendations (5 mins)
  5. Discussion and Q&A (15 mins)
  6. References

Throughout this document italics denote my opinion. All other

@rolandoam
rolandoam / gist:2440784
Created April 22, 2012 01:58
enable webgl on embedded WebViews
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"WebKitWebGLEnabled"];
[[NSUserDefaults standardUserDefaults] synchronize];