short url: caseywatts.com/selfpublish
my book is out! an applied psychology / self-help book targeted at developers: Debugging Your Brain
Markdown
--> PDF
(as a booklet!)
Markdown
--> EPUB
and MOBI
short url: caseywatts.com/selfpublish
my book is out! an applied psychology / self-help book targeted at developers: Debugging Your Brain
Markdown
--> PDF
(as a booklet!)
Markdown
--> EPUB
and MOBI
defmodule Playground do | |
def guess(actual, a..b) do | |
do_guess(actual, a..b, div(b, 2)) | |
end | |
def do_guess(actual, a.._b, number) when actual < number do | |
print_number(number) | |
do_guess(actual, a..number, div(a + number, 2)) | |
end |
ExUnit.start() | |
defmodule ChopTest do | |
use ExUnit.Case, async: true | |
test "Should return guessed number" do | |
teste = Chop.guess(273, 1..1000) | |
assert teste == 273 | |
end |
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'colorize' | |
end | |
class MatcherInterface | |
def initialize(some_object) | |
@some_object = some_object |
''' | |
This script performs efficient concatenation of files stored in S3. Given a | |
folder, output location, and optional suffix, all files with the given suffix | |
will be concatenated into one file stored in the output location. | |
Concatenation is performed within S3 when possible, falling back to local | |
operations when necessary. | |
Run `python combineS3Files.py -h` for more info. | |
''' |
require "active_record" | |
namespace :db do | |
db_config = YAML::load(File.open('config/database.yml')) | |
db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'}) | |
desc "Create the database" | |
task :create do | |
ActiveRecord::Base.establish_connection(db_config_admin) |
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.