- Start a Sinatra server on port 4000
- GET / to that server triggers a
git pull
and mod_rails restart - Hit port 4000 locally after pushing
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
body { padding: 10em; } | |
textarea { min-width: 40em; } | |
div { | |
padding: 2em; | |
border-left: 5px solid #c1c2c4; | |
border-right: 5px solid #c1c2c4; | |
position: relative; | |
} |
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
body { | |
margin: 0 auto; | |
margin-top: 5em; | |
width: 760px; | |
} | |
.pulse { | |
width: 50px; | |
height: 50px; | |
border-radius: 50%; |
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
Git is a tool that can confuse. Some feel intimidated by it, which is a shame, because git's design is stunningly simple: basic building blocks, and very consistent behaviour. It's a design you can always reason about to work things through, once you get the starting point. | |
We'll cover the theory, to nail those first principles -- important stuff, and interesting too, but we won't get bogged down in it. After all, the aim is a new tool in your toolbox. | |
We'll concentrate instead on what makes that stuff important: it's the bread and butter of day-to-day git. Trees, refs, rebasing, branches & tags, and more. | |
If you've ever thought "what the hell did git just do?" or "Oh dear, this repo is really broken now", then this workshop is for you. | |
This is a hands-on workshop. Bring your laptop to follow along. |
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
# Put this file in your config/initializers directory and behold a tastier auto_link! | |
module ActionView | |
module Helpers | |
module TextHelper | |
# Use auto_link and friends from Rails 3. They do the right thing (tm). | |
remove_const(:AUTO_LINK_RE) if defined?(AUTO_LINK_RE) | |
AUTO_LINK_RE = %r{ | |
( https?:// | www\. ) |
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
http://ujihisa.blogspot.com/2009/06/rubygems-best-practice.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
A few things left to do: | |
* Ability to add default options for each PDF, rather than having to pass it to each generate_* method call | |
* Doesn't check if the pdf already exists. By default, which should it do? | |
- Overwrite the existing file. Let your users decide what they'd like to do here. | |
* Consider the inclusion of css, or even generated css templates using pre existing libraries (lesscss or yerk – sass.) | |
Anything else? |
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
# Run the given block +num+ times and then print out the mean, median, min, | |
# max, and stddev of the run. For example: | |
# | |
# irb> stats(10) { sleep(rand / 100) } | |
# mean: 5.99ms | |
# median: 6.76ms | |
# min: 1.49ms | |
# max: 9.28ms | |
# stddev: 2.54ms | |
def stats(num) |
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
# Run the given block +num+ times and then print out the mean, median, min, | |
# max, and stddev of the run. For example: | |
# | |
# irb> stats(10) { sleep(rand / 100) } | |
# mean: 5.99ms | |
# median: 6.76ms | |
# min: 1.49ms | |
# max: 9.28ms | |
# stddev: 2.54ms | |
def stats(num) |
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 Locality::Search | |
def self.included(base) | |
base.class_eval do | |
class << self | |
def search(criteria) | |
logger.debug("search") | |
results = find_all_by_name(criteria) | |
if results.empty? |
NewerOlder