Skip to content

Instantly share code, notes, and snippets.

View brutuscat's full-sized avatar

Mauro Asprea brutuscat

View GitHub Profile
Introduction
The mobile games industry is a multi-billion dollar industry - mobile gaming is
big business and is set to continue growing at an alarming rate. Smart phone
and tablet market penetration is increasing exponentially, with over one billion
units sold worldwide in 2013 alone. The power of mobile gaming devices is
increasing just as fast: mobile processing power has developed to the extent
that smartphones and tablets can produce near console-quality graphics.
At the same time, digital marketplaces have become crowded, and the cost of
raising your head above the parapet through user acquisition has never been
higher. The mobile games industry is under increasing pressure to perform,
# Configure colors, if available.
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
c_reset='\[\e[0m\]'
c_user='\[\e[0;32m\]'
c_path='\[\e[1;34m\]'
c_git_clean='\[\e[0;37m\]'
c_git_staged='\[\e[0;32m\]'
c_git_unstaged='\[\e[0;31m\]'
else
c_reset=
@brutuscat
brutuscat / 99java
Last active August 29, 2015 14:02 — forked from dz0ny/99java
## Setup java
if [ `uname -m` == 'x86_64' ]; then
PATH="/usr/lib64/jvm/java-7-oracle/jre/bin/"
JAVA_HOME="/usr/lib64/jvm/java-7-oracle/"
else
PATH="/usr/lib/jvm/java-7-oracle/jre/bin/"
JAVA_HOME="/usr/lib/jvm/java-7-oracle/"
fi
[client]
[mysqld]
init-connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_general_ci
max_allowed_packet='100M'
innodb_doublewrite=0
innodb_flush_log_at_trx_commit=2
sql_mode=NO_ENGINE_SUBSTITUTION,NO_AUTO_VALUE_ON_ZERO
@brutuscat
brutuscat / MysqlHelper.php
Last active August 29, 2015 14:08
Codeception workaroung to load the dump.sql using the mysql cli binary
<?php
namespace Codeception\Module;
use Codeception\Lib\Driver\Db as Driver;
use Codeception\Exception\Module as ModuleException;
use Codeception\Exception\ModuleConfig as ModuleConfigException;
use Codeception\Configuration as Configuration;
class MysqlHelper extends \Codeception\Module\Db
@brutuscat
brutuscat / gist:1ca90fffb6a03c69faa8
Last active September 8, 2015 10:25 — forked from arichazan/gist:11b579c873e4a043c88d
doesPaymentMatchOptions
/*
* tests whether payment matches options
*
* returns 'true' if matches, 'false' otherwise
*
* $opts is an array of options to filter the payments by
* possible values are
* 'withoutPrefix' => 'prefix' - only select payment without this prefix
* 'withPrefix' => 'prefix' - only select payment with this prefix
* if no options are provided, always returns 'true'
@brutuscat
brutuscat / ExceptionThrower.php
Created February 17, 2011 09:38
Utility for catching PHP errors, warnings and notices, then converting them (throwing) to an exception that can be caught at runtime @author Jason Hinkle - http://verysimple.com/2010/11/02/catching-php-errors-warnings-and-notices/ @copyright 1997-20
<?php
/**
* Utility for catching PHP errors and converting them to an exception
* that can be caught at runtime
* @author Jason Hinkle
* @copyright 1997-2011 VerySimple, Inc.
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @version 1.0
*/
class ExceptionThrower
@brutuscat
brutuscat / application.rb
Created September 22, 2011 17:39
Fix issue with Ruby1.9.2, Rails and Psych (new YAML parser)
# Downgrade to use old YAML parser
YAML::ENGINE.yamler = "syck"
# Lots of other stuff .....
@brutuscat
brutuscat / bsas_neighborhoods.rb
Created October 7, 2011 13:40
Buenos Aires's neighborhoods (Barrios de Buenos Aires y Localidades de la Provincia)
# Neighborhoods from the Autonomous Capital City official ones and some not so.
TOWNS_CABA = Set.new ["Agronomía","Almagro","Balvanera","Barracas","Belgrano",
"Boedo","Caballito","Chacarita","Coghlan","Colegiales","Constitución","Flores",
"Floresta","La Boca","La Paternal","Liniers","Mataderos","Monserrat",
"Monte Castro","Nueva Pompeya","Núñez","Palermo,","Parque Avellaneda",
"Parque Chacabuco","Parque Chas","Parque Patricios","Puerto Madero","Recoleta",
"Retiro","Saavedra","San Cristóbal","San Nicolás","San Telmo","Vélez Sársfield",
"Versalles","Villa Crespo","Villa del Parque","Villa Devoto","Villa Gral. Mitre",
"Villa Lugano","Villa Luro","Villa Ortúzar","Villa Pueyrredón","Villa Real",
"Villa Riachuelo","Villa Santa Rita","Villa Soldati","Villa Urquiza","Abasto",
@brutuscat
brutuscat / gist:1270928
Created October 7, 2011 17:55
A bash for loop to rename all files with an extension, recursively.
# Replace the first ".less" with your extension and ".css.less" with the desired one
for i in `find . -type f`; do mv "$i" `basename -s .less "$i"`.css.less ; done