Skip to content

Instantly share code, notes, and snippets.

View favrik's full-sized avatar
🏀

Favio Manriquez favrik

🏀
View GitHub Profile
<?php
/*
Plugin Name: favrik Recent Posts
Plugin URI: http://blog.favrik.com/
Description: Display recent posts by date: 1) grouping by year, month,day, and 2) just the date at the left side of the title. Based on the work by <a href="http://www.ardamis.com">Oliver Baty</a>. <a href=" http://www.ardamis.com/2007/06/25/adding-the-post-date-to-wp_get_archives/">Details are here</a>.
Version: 0.1
Author: Favio Manriquez
Author URI: http://blog.favrik.com
Copyright 2007 Favio Manriquez (email : favio@favrik.com)
form:
LAYOUT METHOD ACTION
ATTRIB=VALUE ATTRIB2=VALUE2
group:
LEGEND
ATTRIB=VALUE
FIELD1:
TYPE LABEL
VALIDATION1 VALIDATION2 VALIDATION3
<?php
class MorpheusParser {
private $Form = array();
private $group_cursor = 0;
public function __construct() {
}
private function getFile($input) {
<?php
/*
Note: some parts based on the Spyc YAML parser at http://code.google.com/p/spyc/
*/
class MorpheusParser {
private $Form = array();
/* Pseudo Global Variables shared by several methods */
private $group_cursor = 0;
private $field_name = '';
@favrik
favrik / groupsConfig.php
Created January 23, 2010 14:58
How I organize groupsConfig.php in PHP Minify.
<?php
/**
* Groups configuration for default Minify implementation
* @package Minify
*/
/**
* You may wish to use the Minify URI Builder app to suggest
* changes. http://yourdomain/min/builder/
**/
<?php
/*
Template Name: Photo Album
If you want to customize the look and feel of your photo album, follow these steps.
You'll probably need a good understanding of HTML and CSS!
1. Copy this file into your current active theme's directory
2. Also copy all the files starting with "photoalbum-" into your theme's directory
@favrik
favrik / Capfile
Created February 16, 2011 11:46
Deploy para php usando git y Capistrano
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
ssh_options[:forward_agent] = true
default_run_options[:pty] = true
set :application, "GDC"
set :repository, "git@github.com:noahlh/GDC-Online-Vehicle-Reservation-System.git"
set :scm, :git
set :deploy_via, :remote_cache
#!/bin/bash
SITE=$1
TYPE=$2
LUSER="favio"
GIT_USERNAME="favrik"
SITES_FOLDER="/home/favio/web"
cd $SITES_FOLDER
class Reservation < ActiveRecord::Base
has_many :taxes
has_many :surcharges
belongs_to :customer
#logic goes here
end
favrik {
background: #f00;
}