###Invite your readers to leave you a Bitcoin tip on Reddit
Reddit's Bitcoin implementation is ideal for beginners. Here's how to get them to give it a try.
####Structure
<?php | |
/* | |
Plugin Name: Shoestrap Custom Templates | |
Plugin URI: http://shoestrap.org | |
Description: This plugin replaces the default templates with our custom ones using the hooks provided by the <a href="http://shoestrap.org/downloads/shoestrap">Shoestrap</a> theme | |
Version: 1.00 | |
Author: Aristeides Stathopoulos | |
Author URI: http://aristeides.com | |
*/ |
# Try to install HAL | |
apt-get install hal | |
# If there is no "hal" package available, try this: | |
add-apt-repository ppa:mjblenner/ppa-hal | |
apt-get update | |
apt-get install hal |
# |
// convert a dom element to a PDF and download it | |
convert( $('.invoice') ).to( 'invoice.pdf' ).download() | |
// alternatively | |
download( convert( $('.invoice') ).to( 'invoice.pdf' ) ) | |
// convert another website to a png and show it on the page | |
convert( 'http://exam.pl/page' ).toImage().then( $('.screenshots').append ) | |
// attach a file to an email |
// Ask the coffee machine at IP 192.168.2.2 to do its job | |
device('192.168.2.2') | |
.do( 'coffee' ) | |
.then( wakeMeUpCallback ) | |
// turn all lights on | |
device.findAll('light').do('turnOn') |
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 |
# 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: Post Meta Revisions | |
Description: Revisions for the 'foo' post meta field | |
Version: 1.0 | |
Author: John Blackbourn | |
Plugin URI: http://lud.icro.us/post-meta-revisions-wordpress | |
*/ | |