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
--colour | |
-I app |
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
churn number and file name | |
git log --all -M -C --name-only | grep -E '^(app|lib)/' | sort | uniq -c | sort | awk 'BEGIN {print "count,file"} {print $1 "," $2}' | |
churn number and file name w/ limiting to last n commits | |
git log --all -n 5000 -M -C --name-only | grep -E '^spec/models' | sort | uniq -c | sort | awk 'BEGIN {print "count,file"} {print $1 "," $2}' | |
graph of churn number and frequency | |
git log --all -M -C --name-only | grep -E '^(app|lib)/' | sort | uniq -c | sort | awk '{print $1}' | uniq -c | sort | awk 'BEGIN { print "frequency,churn_count"} { print $1,$2}' | |
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 Editable exposing (..) | |
type Editable ofType | |
= NotEditing { value : ofType } | |
| Editing { originalValue : ofType, buffer : ofType } | |
value : Editable ofType -> ofType | |
value editable = |
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
def foo | |
p self | |
end | |
p self | |
foo |
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
if ENV['LOAD_RAILS'] == '1' | |
task :stats => "ma:add_no_rails_dirs_to_stats" | |
namespace :ma do | |
desc "Report code statistics (KLOCs, etc) from the application" | |
task :add_no_rails_dirs_to_stats do | |
require 'rails/code_statistics' | |
::STATS_DIRECTORIES << %w(NoRails\ Lib\ specs spec_no_rails/lib) if File.exist?('spec_no_rails/lib') | |
::CodeStatistics::TEST_TYPES << "NoRails Lib specs" if File.exist?('spec_no_rails/lib') | |
::STATS_DIRECTORIES << %w(NoRails\ Model\ specs spec_no_rails/model) if File.exist?('spec_no_rails/model') |
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 Flow exposing (Flow(..), map, withDefault, mapDefault, view, update) | |
import Html | |
type Flow state | |
= NotRunning | |
| Running state | |
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
% Peano's Axioms | |
:- module(peano, [ | |
is_zero/1, | |
is_natural/1, | |
equal/2, | |
add/3, | |
subtract/3, | |
multiply/3, | |
divide/3 | |
]). |
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
% Peano's Axioms | |
:- module(peano, [ | |
is_zero/1, | |
is_natural/1, | |
equal/2, | |
pred/2 | |
]). | |
/** Peano's Axioms | |
* |
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 CoderetreatLive::Coderetreats | |
# this Coderetreat gets loaded instead of the AR | |
class Coderetreat | |
include States | |
end | |
describe "The states a coderetreat can be in" do | |
let(:retreat) { Coderetreat.new } | |
example "Going through the day of a coderetreat" do | |
retreat.should be_not_started | |
retreat.start! |
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
type Maybe<T> = T | undefined; | |
function maybeMap<T, U>(mv: Maybe<T>, f: (v:T) => U) : Maybe<U> { | |
if(mv !== undefined) { | |
return f(mv); | |
}else{ | |
return undefined; | |
} | |
} | |
function maybeBind<T, U>(mv: Maybe<T>, f: (v:T) => Maybe<U>) : Maybe<U> { | |
if(mv !== undefined) { |
NewerOlder