Skip to content

Instantly share code, notes, and snippets.

View ScottPhillips's full-sized avatar

Scott Phillips ScottPhillips

  • Los Angeles, CA
View GitHub Profile
<?php
namespace App\Providers;
use Illuminate\Routing\Router;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
@v-jacob
v-jacob / Mailhog Bash Script (upstart)
Last active December 5, 2018 12:22
Mailhog Bash Script
#!/usr/bin/env bash
echo ">>> Installing Mailhog"
# Download binary from github
wget --quiet -O ~/mailhog https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64
# Make it executable
chmod +x ~/mailhog
@rossy
rossy / solarizedchan.css
Created May 27, 2012 10:51
Solarized theme for [code] tags on /g/.
pre.prettyprint .str { color: #859900 !important; }
pre.prettyprint .kwd { color: #268bd2 !important; }
pre.prettyprint .com { color: #cb4b16 !important; font-style: italic; }
pre.prettyprint .typ { color: #2aa198 !important; }
pre.prettyprint .lit { color: #dc322f !important; }
pre.prettyprint .pun { color: #2aa198 !important; }
pre.prettyprint .pln { color: #839496 !important; }
pre.prettyprint .tag { color: #6c71c4 !important; }
pre.prettyprint .atn { color: #268bd2 !important; }
pre.prettyprint .atv { color: #2aa198 !important; }
@markoheijnen
markoheijnen / gist:2399864
Created April 16, 2012 16:40
Change Post to News
<?php
add_action( 'init', array( &$this, 'change_post_object_label' ), 0 );
add_action( 'admin_menu', array( &$this, 'change_post_menu_label' ), 0 );
add_filter( 'post_updated_messages', array( &$this, 'post_updated_messages') );
function change_post_menu_label() {
global $menu;
global $submenu;
if( isset( $menu[5], $submenu['edit.php'] ) ) {
@jonathonbyrdziak
jonathonbyrdziak / taxmeta.class.php
Created February 22, 2012 18:17
Taxonomy Metaboxes, allows you to create additional taxonomy metas, including images.
<?php
/**
* @Author Anonymous
* @link http://www.redrokk.com
* @Package Wordpress
* @SubPackage RedRokk Library
* @copyright Copyright (C) 2011+ Redrokk Interactive Media
*
* @version 2.0
*/
a.tag, span.tag {
display: inline-block;
text-decoration: none;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
padding: 4px 7px;
font-family: 'Helvetica Neue', helvetica, sans-serif;
font-size: 12px;
line-height: 14px;
height: 14px;
vertical-align: middle;
@ptz0n
ptz0n / gist:1217080
Created September 14, 2011 16:51
Validate JSONP Callback
<?php
/**
* Validate JSONP Callback
*
* https://github.com/tav/scripts/blob/master/validate_jsonp.py
* https://github.com/talis/jsonp-validator/blob/master/src/main/java/com/talis/jsonp/JsonpCallbackValidator.java
* http://tav.espians.com/sanitising-jsonp-callback-identifiers-for-security.html
* http://news.ycombinator.com/item?id=809291
*
@adlawson
adlawson / currency.php
Created August 21, 2011 22:09
Country & currency codes
/**
* List of currencies
* @see ISO 4217
* @var array
*/
$currency = array(
'AUD' => array(
'title' => 'Australian Dollar',
'symbol_left' => '&#36;', // $
'symbol_right' => '',
@markjaquith
markjaquith / disable-plugins-when-doing-local-dev.php
Created June 24, 2011 10:24
Disables specified WordPress plugins when doing local development
<?php
/*
Plugin Name: Disable plugins when doing local dev
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify
Version: 0.1
License: GPL version 2 or any later version
Author: Mark Jaquith
Author URI: http://coveredwebservices.com/
*/