This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
I, Jason Huggins, the author of the work "CoffeeScript Web Server" (2010), irrevocably renounce | |
all current and future legal rights to the work in any medium whatsoever. | |
I stand behind the merit of the work, but disclaim all liability for it under law. | |
I encourage you, the audience, to share, copy, distribute, perform, remix, mash up, interpret, | |
excerpt, translate, and otherwise enjoy and use the work as you will. | |
I request that you acknowledge my authorship. |
# config/database.rb | |
config_file = Padrino.root("config", "mongoid.yml") | |
if File.exists?(config_file) | |
settings = YAML.load(ERB.new(File.read(config_file)).result)[Padrino.env.to_s] | |
::Mongoid.from_hash(settings) if settings.present? | |
end |
<?php | |
/* | |
Plugin Name: Disable Wptexturize | |
Description: Removes most calls to this incredible slow function. | |
Version: 1.0 | |
Author: Thomas Scholz | |
Author URI: http://toscho.de | |
License: GPL | |
*/ |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
require 'digest/md5' | |
=begin | |
About: | |
This script automatically runs on a 2-second loop, searches the current directory for haml & sass files that have been modified since the last iteration and builds them as needed into a file with the same name minus the .haml/sass extension. I wrote it so I could use Haml & Sass to develop Wordpress themes. | |
How-to: | |
1) Name your source files with the extension you'd like them to have, then add ".haml" or ".sass" as appropriate... | |
For example: index.php.haml and styles.css.sass |
<?php | |
// bump this limit up as it can be quite memory intensive if you have a lot of shared items | |
ini_set('memory_limit', '64M'); | |
// update to use your own file here | |
$json_file = "/tmp/shared-items.json"; | |
// output the std header | |
// http://msdn.microsoft.com/en-us/library/aa753582(v=vs.85).aspx |
This gist assumes:
Since this is on Hacker News and reddit...
_t
in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I am the system libraries".char *
s.type * name
, however, is entirely intentional.See https://en.bitcoin.it/wiki/BIP_0070 for the latest version of this document; I'll keep this document so the process of discussion/revision isn't lost.
This document proposes protocol buffer-based formats for a simple payment protocol between a customer's bitcoin client software and a merchant.
<script language="JavaScript" type="text/javascript"> | |
// Comcast Cable Communications, LLC Proprietary. Copyright 2012. | |
// Intended use is to display browser notifications for critical and time sensitive alerts. | |
var SYS_URL='/e8f6b078-0f35-11de-85c5-efc5ef23aa1f/aupm/notify.do'; | |
// var image_url='http://servicealerts.comcast.net:8080/images/mt'; | |
var image_url='http://xfinity.comcast.net/constantguard/BotAssistance/notice/images'; | |
var headertext1='<strong>Comcast Courtesy Notice</strong>'; | |
var textline1='You have reached 90% of your <b>monthly data usage allowance</b>.'; | |
var textline2='Please sign in for more information and to remove this alert.'; | |
var acknowledgebutton='<a href=\"#\" onClick="document.location.href=\''+SYS_URL+'?dispatch=redirect&redirectName=login¶mName=bmUid\'" title="Sign in to acknowledge" style="color: #FFFFFF;"><img alt="Sign in to acknowledge" src="'+image_url+'/mt_signin.png"/></a>'; |