Skip to content

Instantly share code, notes, and snippets.

View peebeebee's full-sized avatar

Peter Briers peebeebee

View GitHub Profile
@peebeebee
peebeebee / new_kohana_app.sh
Created February 1, 2011 13:10
Simple Kohana New App Bash Script
git clone git://github.com/kohana/kohana.git $1
cd $1
git submodule init
git submodule update
@peebeebee
peebeebee / dabblet.css
Created July 18, 2012 15:59
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@peebeebee
peebeebee / View_Model
Created August 10, 2012 18:10 — forked from cambiata/View_Model
Simplistic Kohana3 View_Model attempt
<?php defined('SYSPATH') or die('No direct script access.');
/**
*
* Simplistic View_Model attempt for Kohana 3, Based on Cambiata's viewmodel
* @author peebeebee
*/
class View extends Kohana_View {
@peebeebee
peebeebee / boerenbond
Created October 14, 2013 08:06
Boerenbond Zakes
s
@peebeebee
peebeebee / WP-Cleanup
Created November 2, 2013 00:04
Wordpress Cleanup
// remove junk from head
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wp_generator');
remove_action('wp_head', 'feed_links', 2);
remove_action('wp_head', 'index_rel_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'feed_links_extra', 3);
remove_action('wp_head', 'start_post_rel_link', 10, 0);
remove_action('wp_head', 'parent_post_rel_link', 10, 0);
remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);
@peebeebee
peebeebee / gist:9113261
Created February 20, 2014 13:14
Get jQuery function on handlers.
/**
* Type this in the console.
* Doubleclick on the handler information you want.
* It will show the REAL function that will be executed instead of the jQuery handler :)
*/
// >= jQuery 1.8
jQuery._data( $('.element').get(0), "events");
// <= jQuery 1.8
jQuery( $('.element').get(0) ).data( "events" );
@peebeebee
peebeebee / gist:9176850
Created February 23, 2014 20:33
Exit shell on error
#!/bin/sh -e
/*
When this option is on, if a simple command fails for any of the reasons listed in Consequences of Shell Errors or returns an exit status value >0, and is not part of the compound list following a while, until, or if keyword, and is not a part of an AND or OR list, and is not a pipeline preceded by the ! reserved word, then the shell shall immediately exit.
*/
@peebeebee
peebeebee / Capistrano
Created March 3, 2014 04:56
Capistrano
bundle exec cap production git:check --trace
** Invoke production (first_time)
** Execute production
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke git:check (first_time)
** Invoke git:wrapper (first_time)
** Execute git:wrapper
INFO [0e2870b7] Running /usr/bin/env mkdir -p /tmp/leukemissie/ on myhost.com
D, [2014-03-03T05:52:29.674278 #16552] DEBUG -- net.ssh.transport.session[3fc5a541b75c]: establishing connection to myhost.com:22
@peebeebee
peebeebee / gist:76a07b711b9da0120c76
Created May 15, 2014 10:02
Help & Support Alpha version theming
.page-help-and-support {
#content-inner {
width: auto;
}
.hs-bar {
position: relative;
overflow: hidden;
Index: content/plugins/wp-tell-a-friend-popup-form/wp-tell-a-friend-popup-form.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- content/plugins/wp-tell-a-friend-popup-form/wp-tell-a-friend-popup-form.php (date 1403968273000)
+++ content/plugins/wp-tell-a-friend-popup-form/wp-tell-a-friend-popup-form.php (revision )
@@ -49,36 +49,36 @@
<?php
}