Skip to content

Instantly share code, notes, and snippets.

View davidhemphill's full-sized avatar
💀
WIP

Hemp davidhemphill

💀
WIP
View GitHub Profile
// Run via OS X Terminal.app to block junk tweets in Tweetie.
// Info: http://atebits.posterous.com/test-filtering-in-tweetie-for-mac
defaults write com.atebits.tweetie-mac filterTerms -array "@gowalla" "http://gowal.la" "@foursquare" "http://4sq.com"
/* `HTML5 Reset
----------------------------------------------------------------------------------------------------*/
a,
abbr,
address,
article,
aside,
audio,
b,
// TinyMCE Settings.
tinyMCE.init({
extended_valid_elements: 'style',
mode: 'exact',
elements: 'id_name',
theme: 'advanced',
theme_advanced_toolbar_location: 'top',
theme_advanced_toolbar_align: 'left',
plugins: 'safari, style, table, paste, media',
theme_advanced_buttons1: 'bold, italic, underline, justifyleft, justifycenter, justifyright, justifyfull, formatselect, fontselect, fontsizeselect',
@davidhemphill
davidhemphill / example.php
Created August 2, 2012 08:31 — forked from drewjoh/example.php
A Simple Postmark PHP Class with Attachments
<?php
require("postmark.php");
$postmark = new Postmark("your-api-key","from-email","optional-reply-to-address");
$result = $postmark->to("reciver@example.com")
->subject("Email Subject")
->plain_message("This is a plain text message.")
->attachment('File.pdf', $file_as_string, 'application/pdf')
<?php
class CustomDeleteModel extends Eloquent
{
// Return our custom query any time we run a query from this model
protected function query()
{
return new CustomDeleteQuery($this);
}

Instructions

  • Install stud $ brew install https://raw.github.com/paulnicholson/homebrew/master/Library/Formula/stud.rb
  • Download and install the powssl script $ curl https://raw.github.com/gist/2050941/3ea59efe8c7e9013c265313045a9fdda5c653963/powssl > ~/bin/powssl $ chmod +x ~/bin/powssl
  • Run powssl to create development certificate and configure stud.
  • $ powssl
@davidhemphill
davidhemphill / env.php
Last active December 20, 2015 21:58 — forked from zackkitzmiller/env.php
<?php
$env = $app->detectEnvironment(function() {
return getenv('[APPNAME]_ENV') ?: 'development';
});
@davidhemphill
davidhemphill / SassMeister-input.scss
Created December 4, 2013 16:56 — forked from lunelson/SassMeister-input.scss
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
/*
A slightly more automated approach to BEM modifier classes:
using '&' parent selector interpolation, modifiers extend their bases,
so that HTML markup requires only the modifier class not the base *and* modifier
*/
(function() {
'use strict';
var gulp = require('gulp'),
gutil = require('gulp-util'),
dot = require('gulp-dot'),
less = require('gulp-less'),
sass = require('gulp-sass'),
rm = require('rimraf'),
reload = require('gulp-livereload'),
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/