Skip to content

Instantly share code, notes, and snippets.

View gaby-mg-snippets's full-sized avatar

gaby-mg-snippets

View GitHub Profile
@gaby-mg-snippets
gaby-mg-snippets / vagrant_puphpet_custom_prov.sh
Last active August 29, 2015 14:01
Vagrant: PuPHPet: Custom provisioning
#!/bin/bash
composer global require fabpot/php-cs-fixer squizlabs/php_codesniffer
@gaby-mg-snippets
gaby-mg-snippets / autotest.rb
Created January 19, 2014 15:16
Ruby: watchr wrapper script for TDD with PHPUnit
watch("models/(.*).php") do |match|
run_test %{tests/test_#{match[1]}.php}
end
watch("tests/.*.php") do |match|
run_test match[0]
end
def run_test(file)
unless File.exist?(file)
@gaby-mg-snippets
gaby-mg-snippets / gist:6941259
Created October 11, 2013 20:11
gabymg.com/projects-custom-post-type
add_action( 'init', 'create_gaea_projects_post_type');
function create_gaea_projects_post_type()
{
register_post_type( 'gaea_project',
array(
'labels' => array(
'name' => 'Projects',
'singular_name' => 'Project'
),
@gaby-mg-snippets
gaby-mg-snippets / gist:2320687
Created April 6, 2012 15:13
JavaScript: Self-Invoking Anonymous Function
(function() {
})();
@gaby-mg-snippets
gaby-mg-snippets / gist:2251617
Created March 30, 2012 13:36
HTML: XHTML 1.0 Strict Starting Template
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title></title>
</head>
<body>