Skip to content

Instantly share code, notes, and snippets.

View felipepodesta's full-sized avatar
👨‍💻
Stairway To Heaven

Felipe Podestá felipepodesta

👨‍💻
Stairway To Heaven
View GitHub Profile
@felipepodesta
felipepodesta / compress-tables.sh
Created April 18, 2012 16:31 — forked from deviantintegral/compress-tables.sh
Compress MySQL Tables
#!/usr/bin/env bash
# Compress MySQL tables on disk.
# Author: Andrew Berry, [email protected]
#
# Compress all tables in a MySQL InnoDB database using compression from the
# Barracuda table format. Tables have to already be in the Barracuda file
# format to actually compress tables, otherwise the table setting is ignored.
#
# innodb_file_per_table = 1 MUST be set in my.cnf for compression to work.
@felipepodesta
felipepodesta / strip_info.php
Created May 4, 2012 03:10 — forked from joshkoenig/strip_info.php
Strip drupal.org packaging data from core .info files
<?php
/**
* Quick script for stripping drupal packaging info.
*
* Run in the drupal root, or specify the root as an argument. E.g.:
*
* php strip_info.php path/to/drupal
*
*/
@felipepodesta
felipepodesta / PastryKit.js
Created May 11, 2012 14:40 — forked from aemkei/PastryKit.js
PastryKit - Apple iPhone Webdev Library
const PKSupportsTouches = ("createTouch" in document);
const PKStartEvent = PKSupportsTouches ? "touchstart" : "mousedown";
const PKMoveEvent = PKSupportsTouches ? "touchmove" : "mousemove";
const PKEndEvent = PKSupportsTouches ? "touchend" : "mouseup";
function PKUtils() {}
PKUtils.assetsPath = "";
PKUtils.t = function (b, a) {
return "translate3d(" + b + "px, " + a + "px, 0)"
};
@felipepodesta
felipepodesta / gist:2660191
Created May 11, 2012 14:43 — forked from bmorton/gist:1204251
4 iPhone Libraries

4 iPhone libraries to make your first iPhone app experience better

I've dabbled in countless iPhone examples, demo apps, and personal hacks. I've watched almost every WWDC session and iTunes U video about iOS. I constantly download apps from the App Store when I hear they do something cool or if they visually impress me. I feed off the libraries listed in others' legal sections listing out their licenses and attributing credit where credit is due.

And now I'm working on my first official, commercially-backed app. And it's not easy. Luckily, I've got somewhere to start. Plenty of people have solved the problems I've encountered. I can't even begin to thank them enough, but this is my attempt to give them the credit they deserve and spread the word on some great open source projects.

ASIHTTPRequest from All-Seeing Interactive

I've found that communicating with an API in an iPhone app requires a bit more than Apple provides in its base frameworks. ASIHTTPRequest fills that gap and provides a wrapper

@felipepodesta
felipepodesta / gist:3819131
Created October 2, 2012 13:27 — forked from jayhealey/gist:3815461
Try out Laravel 4 pre-release!
Run the following in the terminal.
git clone git://github.com/illuminate/app.git && cd app && composer update
This will download Illuminate (the name of the component set that makes up Laravel 4) into a directory called 'app' and run composer to get all the dependancies.
Of course, it's still heavily in development so it's clearly not finished but you can poke around and see how it works. Enjoy!
@felipepodesta
felipepodesta / gist:3824529
Created October 3, 2012 02:08 — forked from jayhealey/gist:3815461
Try out Laravel 4 pre-release!
Run the following in the terminal.
git clone git://github.com/illuminate/app.git && cd app && composer update
This will download Illuminate (the name of the component set that makes up Laravel 4) into a directory called 'app' and run composer to get all the dependancies.
Of course, it's still heavily in development so it's clearly not finished but you can poke around and see how it works. Enjoy!
@felipepodesta
felipepodesta / gist:3931912
Created October 22, 2012 15:02 — forked from pedroelsner/gist:3212276
Masked Input Celular
// jQuery Masked Input
$('#celular').mask("(99) 9999-9999?9").ready(function(event) {
var target, phone, element;
target = (event.currentTarget) ? event.currentTarget : event.srcElement;
phone = target.value.replace(/\D/g, '');
element = $(target);
element.unmask();
if(phone.length > 10) {
element.mask("(99) 99999-999?9");
} else {
@felipepodesta
felipepodesta / fabfile.py
Created November 10, 2012 04:24 — forked from speedygfw/fabfile.py
Zend2 - Module Generator - Fabfile
from fabric.api import local
def create_module(name):
local('mkdir %s' % name)
local('mkdir %s' % name + '/config')
#src
local('mkdir %s' % name + '/src')
local('mkdir %s' % name + '/src/%s' % name)
local('mkdir %s' % name + '/src/%s' % name + '/Controller')
@felipepodesta
felipepodesta / zend2.php
Created November 10, 2012 04:25 — forked from edmondscommerce/zend2.php
some notes from teaching zend 2
<?php
//setcookie('username', 'joseph');
//echo $_COOKIE['username'];
//Check if they have the cookie value for username
if(!empty($_COOKIE['username1'])){
//If they do display it
echo $_COOKIE['username1'];
}else{
// If they do not, display a form that will post the username
Symfony2
http://www.symfony2cheatsheet.com/