Skip to content

Instantly share code, notes, and snippets.

View howardpanton's full-sized avatar

Howard Panton howardpanton

View GitHub Profile
var gulp
= require('gulp'),
gutil = require('gulp-util'),
gutils = require('gulp-load-utils')(['date']);
sass = require('gulp-sass'),
csso = require('gulp-csso'),
uglify = require('gulp-uglify'),
jade = require('gulp-jade'),
concat = require('gulp-concat'),
livereload = require('gulp-livereload'), // Livereload plugin needed: https://chrome.google.com/webstore/detail/livereload/

Adding HipChat support to applications

Simple instruction that show you how to add HipChat support for your app so that it will post to a room of your choice, preferably one for the application in question. Both require an API token which you can get from Niklas. v2 of the HipChat API lets you use your own tokens, but I couldn't get that working intially.

Travis

You can optionally use secure tokens in your travis.yml file. It requires you to install the travis command line tool:

$ gem install travis

<head>
<!--[Font include]
/**
* @license
* MyFonts Webfont Build ID 2886433, 2014-09-19T11:53:00-0400
*
* The fonts listed in this notice are subject to the End User License
* Agreement(s) entered into by the website owner. All other parties are
* explicitly restricted from using the Licensed Webfonts(s).
*
<?php
//Q1. PHP - Complete remove_nonAtoZ() below
function remove_nonAtoZ($input) {
// example data: $input = "BA'3Ndf$%^A&*(nN)A";
// $output = "BANANA";
// Create RegExpr to remove non capital letters
$pattern = "/[A-Z]+/";
// Filter using Preg Match
preg_match_all($pattern, $input, $match);
//
// Matslab Question 5 Bonus
// Howard PAnton
//
(function() {
// Add new input option
$(".add_button").click(function(){
var value = $(".option_name").val();
@howardpanton
howardpanton / gist:1605732
Created January 13, 2012 11:50
Copy ssh file contents
cat ~/.ssh/id_rsa.pub | pbcopy
@howardpanton
howardpanton / wordpress-height-images
Created February 12, 2012 21:06
Remove Height and with from wordpress images
* we will remove all the width and height references, therefore the img tag
* will not add width and height attributes to the image sent to the editor.
*
* @param bool false No height and width references.
* @param int $id Attachment ID for image.
* @param array|string $size Optional, default is 'medium'. Size of image, either array or string.
* @return bool|array False on failure, array on success.
*/
function myprefix_image_downsize( $value = false, $id, $size ) {
if ( !wp_attachment_is_image($id) )
@howardpanton
howardpanton / gist:2084309
Created March 18, 2012 23:08 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
<h1>Testing PHP Tabs</h1>
<?php
$links = array();
$texts = array();
// Add items to array
<t4 type="navigation" id="627"/>
@howardpanton
howardpanton / gist:2991093
Created June 25, 2012 20:42 — forked from thehydroimpulse/gist:2872907
A Laravel task generator. Models, Migrations and Controllers.
<?php
/**
* @copyright 2012 TheHydroImpulse, Daniel Fagnan
* @version 0.1
* @todo Add an overwite ability. Among other things.
* @note Use this as you wish. Extend it, Mash it. Enjoy it.
*/