Skip to content

Instantly share code, notes, and snippets.

View jhbabon's full-sized avatar
🦊

Juan Hernández jhbabon

🦊
View GitHub Profile
@jhbabon
jhbabon / ios_ui_design_tips.markdown
Created February 11, 2012 20:45
iOS UI Design Tips

iOS User Interface Design Tips

Focus

  • Create an application definition statement.
  • Reduce your app's feature set to just the essentials.
  • In the UI, display only the most important items.
  • Showcase content.
  • Place secondary options in separate screen or popover.
@jhbabon
jhbabon / unicorn.rb
Created February 1, 2012 18:16
Basic unicorn configuration for Rails
# -*- encoding: utf-8 -*-
# config/server/unicorn.rb
require 'fileutils'
# required data
env = ENV['RACK_ENV']
app_dir = File.expand_path('../../..', __FILE__)
app_key = 'app'
@jhbabon
jhbabon / uninstall_all_gems.sh
Created November 9, 2011 21:36
Uninstall all gems
gem list | cut -d" " -f1 | xargs gem uninstall -aIx
@jhbabon
jhbabon / render_template.php
Created August 3, 2011 18:06
Quick and dirty PHP function to render templates
<?php
function render($template, $params = array(), $directory = 'templates') {
// make sure that the template has the desired params
extract($params);
// catch the template content
ob_start();
include($directory . '/' . $template . '.php'); // you have the correct include_path, right?
$applied_template = ob_get_contents();
@jhbabon
jhbabon / Autoloader.php
Created February 22, 2011 17:00
Very simple autoloader class
<?php
/**
* Very simple autoloader class
*
* This class loads another classes following the Zend naming convention:
* - Class name: Foo_Bar
* - File name: Foo/Bar.php
*
* Example of use:
@jhbabon
jhbabon / gist:747457
Created December 19, 2010 16:32
Template for XeTeX documents
% Plantilla para documentos XeTeX
\documentclass[10pt]{report}
% LAYOUT
\usepackage[a4paper]{geometry}
%% Márgenes
\geometry{
includeheadfoot,
twoside,