This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- that is very similar to that of pandoc's HTML writer. | |
-- There is one new feature: code blocks marked with class 'dot' | |
-- are piped through graphviz and images are included in the HTML | |
-- output using 'data:' URLs. | |
-- | |
-- Invoke with: pandoc -t sample.lua | |
-- | |
-- Note: you need not have lua installed on your system to use this | |
-- custom writer. However, if you do have lua installed, you can | |
-- use it to test changes to the script. 'lua sample.lua' will |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Enable TRIM support for 3rd Party SSDs. Works for Mountain Lion, should work on earlier OSes too. | |
# Tested on 10.8.2, 10.8.3, 10.8.5, 10.9.0-10.9.5, 10.10.0-10.10.1, 10.10.4 | |
# | |
# Run this script at your own risk, whether on 10.10 or earlier. | |
# | |
# This script works on MacOS 10.10-10.10.1 (Yosemite) but it has significant system security repercussions. | |
# To use it you must disable kext signing on your machine. This makes it easier for | |
# malware to infect your machine by disabling the feature which would detect unsigned |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this to your application.rb | |
config.middleware.use Rack::Cors do | |
allow do | |
origins '*' | |
# location of your API | |
resource '/api/*', :headers => :any, :methods => [:get, :post, :options, :put] | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "pathname" | |
namespace :deploy do | |
task :create_symlink, :except => { :no_release => true } do | |
deploy_to_pathname = Pathname.new(deploy_to) | |
on_rollback do | |
if previous_release | |
previous_release_pathname = Pathname.new(previous_release) | |
relative_previous_release = previous_release_pathname.relative_path_from(deploy_to_pathname) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Enable TRIM support for 3rd Party SSDs. Works for Mountain Lion | |
# | |
# Source: http://digitaldj.net/2011/07/21/trim-enabler-for-lion/ | |
set -e | |
set -x | |
# Back up the file we're patching |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Devise.friendly_token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Copyright (c) 2007, Roger Veciana | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* | |
* Redistributions of source code must retain the above copyright notice, this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Zend Framework Controller Plugin to allow post output processing | |
* | |
* @version 1 | |
* @author Ashley White, http://www.needathinkle.com/ | |
* @license http://creativecommons.org/licenses/by-sa/3.0/ | |
*/ | |
final class Thinkle_Controller_Plugin_PostProcess extends Zend_Controller_Plugin_Abstract { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<b:if cond='data:blog.url == data:blog.homepageUrl'> | |
<title><data:blog.title/> - blog description </title> | |
<b:else/> | |
<b:if cond='data:blog.pageType == "index"'> | |
<title><data:blog.pageName/> - <data:blog.title/> - blog description </title> | |
<b:else/> | |
<b:if cond='data:blog.pageType == "static_page"'> | |
<title><data:blog.pageName/> - <data:blog.title/></title> | |
<b:else/> | |
<b:if cond='data:blog.pageType == "item"'> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Utility for catching PHP errors and converting them to an exception | |
* that can be caught at runtime | |
* @author Jason Hinkle | |
* @copyright 1997-2011 VerySimple, Inc. | |
* @license http://www.gnu.org/licenses/lgpl.html LGPL | |
* @version 1.0 | |
*/ | |
class ExceptionThrower |
NewerOlder