- http://david.heinemeierhansson.com/2014/tdd-is-dead-long-live-testing.html
- http://blog.8thlight.com/uncle-bob/2014/04/25/MonogamousTDD.html
- http://david.heinemeierhansson.com/2014/test-induced-design-damage.html
- http://blog.8thlight.com/uncle-bob/2014/05/01/Design-Damage.html
- http://david.heinemeierhansson.com/2014/slow-database-test-fallacy.html
- http://blog.8thlight.com/uncle-bob/2014/04/30/When-tdd-does-not-work.html
- https://www.destroyallsoftware.com/blog/2014/tdd-straw-men-and-rhetoric
- http://articles.coreyhaines.com/posts/active-record-spec-helper/
- http://martinfowler.com/bliki/UnitTest.html
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
module Gollum | |
module HTML | |
# Extract all tags into the tagmap and replace with placeholders. | |
# | |
# Returns the placeholder'd String data. | |
class ExtractWikiLinksFilter < ::HTML::Pipeline::TextFilter | |
def call | |
result[:wiki_links] = {} | |
return @text if context[:format] == :asciidoc |
- You can store a price in a floating point variable.
- All currencies are subdivided in 1/100th units (like US dollar/cents, euro/eurocents etc.).
- All currencies are subdivided in decimal units (like dinar/fils)
- All currencies currently in circulation are subdivided in decimal units. (to exclude shillings, pennies) (counter-example: MGA)
- All currencies are subdivided. (counter-examples: KRW, COP, JPY... Or subdivisions can be deprecated.)
- Prices can't have more precision than the smaller sub-unit of the currency. (e.g. gas prices)
- For any currency you can have a price of 1. (ZWL)
- Every country has its own currency. (EUR is the best example, but also Franc CFA, etc.)
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
# encoding: UTF-8 | |
# | |
# $ rake checkout new_branch_name | |
# | |
# Via https://gist.github.com/jonlemmon/4076864 | |
# | |
# 1. Roll back any migrations on your current branch which do not exist on the | |
# other branch | |
# 2. Discard any changes to the db/schema.rb file | |
# 3. Check out the other branch |
Other people's code is awful, and your own code from months previous counts as someone else's. With this and the festive spirit in mind, I dug up a canvas snow demo I made two years ago to see how bad my code really was.
Turns out the performance landscape has changed quite a bit, but after applying a couple of workarounds, best practices, and memory management, I got the demo running smoother than it ever did.
Ugh, I can't believe I just wrote "performance landscape". Anyway...
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
// New fontface naming conventions & API | |
// File Structure | |
// | |
// - fonts_dir/ [config setting] | |
// - simple.eot | |
// - simple.svg | |
// - simple.ttf | |
// - simple.woff | |
// - folder/ |
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
client = Savon::Client.new do | |
# This can be a URL also | |
wsdl.document = "/Path/to/your.wsdl" | |
# These are optional, only if your WSDL sucks :) | |
wsdl.endpoint = "https://your_endpoint" | |
wsdl.namespace = "http://your_namespace" | |
certs = Akami::WSSE::Certs.new :cert_file => "/path/to/cert.crt", :private_key_file => "/path/to/private/key.pem", :private_key_password => "password" | |
wsse.sign_with = Akami::WSSE::Signature.new certs |
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 | |
/* | |
Plugin Name: Sunnytize | |
Plugin URI: | |
Description: A better file name sanitizer | |
Version: 1.0 | |
Author: Sunny Ripert | |
Author URI: http://sunfox.org | |
*/ |
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
##### | |
##### Easily enable clearType on windows. | |
##### | |
*** WHAT IT DOES *** | |
It asks the user to install an activex control, signed by microsoft. | |
This activex control allows cleartype options to be set using javascript. |