F# | C# | Scala | Clojure | Python | Ruby | Haskell | SQL | OCaml | Common Lisp | Erlang | Smalltalk | Scheme | Ecmascript 5 | Perl 5 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
map | Select | map | map | map | collect | map | Select | map | mapcar | map | collect: | map | map | map |
filter | Where | filter | filter | filter | select | filter | Where | filter | remove-if-not | filter | select: | filter | filter | grep |
fold | Aggregate | foldLeft | reduce | reduce | inject | foldl |
Note: This argument is... not exactly tongue in cheek. I believe it, but I possibly don't hold this view quite as strongly as I'm putting forth.
The problem with the arithmetic mean is that it gives you a view of a population which does not in fact reflect the experiences of any individual member of it.
This is particularly problematic in distributions which are "peaky" in the sense of having their mass concentrated towards the high end of the spectrum. Such distributions are common: In particular power laws and log-normal distributions (log-normal distributions being what you get when you have a large number of small independent multiplicative rather than additive effects) both have this property.
When you apply the arithmetic mean as a way of gauging these distributions you are oppressing the disadvantages.
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> High Sierra
namespace :secret do | |
desc "Edit an encrypted data bag item in EDITOR" | |
task :edit, :item do |t, args| | |
unless ENV['EDITOR'] | |
puts "No EDITOR found. Try:" | |
puts "export EDITOR=vim" | |
exit 1 | |
end | |
abort 'usage: rake "secret:edit[<item name>]"' unless args.item |
We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
// clean and pure: | |
function cons(x, y) { | |
return function(pick) { | |
return pick(x, y); | |
} | |
} | |
// does more stuff: | |
function cons(x, y) { | |
var fn = function(pick) { |
Some scripts/configurations that greatly improve tmux/vim workflows. The shell scripts target zsh but should be adaptable without much effort for other unix shells.
Features:
- Transparently move between tmux panes and vim windows
- Using the shell, open files in one vim instance per project or directory
- Fully integrated copy/paste between tmux, vim and x11 using simple keybinds(need to install the xclip program)
- Easily send text to any tmux pane without breaking your edit workflow(needs slimux
'vim-tmux-move.zsh', '.vimrc' and '.tmux.conf' cooperate so you can move transparently between tmux panes and vim windows using ALT + (arrow keys or jkhl). It was based on this gist
# Bash-Completion script for PHPUnit | |
# | |
# Created by Henrique Moody <henriquemoody@gmail.com> | |
# | |
_phpunit() | |
{ | |
COMPREPLY=() | |
local cur="${COMP_WORDS[COMP_CWORD]}" | |
local prev="${COMP_WORDS[COMP_CWORD-1]}" |
function! SyntaxCheckers_chef_IsAvailable() | |
return executable('foodcritic') | |
endfunction | |
function! SyntaxCheckers_chef_GetLocList() | |
" let exe = expand(g:syntastic_ruby_exec) | |
" if !has('win32') | |
" let exe = 'RUBYOPT= ' . exe | |
" endif |
full_data = { | |
response: {body: StyledYAML.literal(DATA.read), status: 200}, | |
person: StyledYAML.inline('name' => 'Steve', 'age' => 24), | |
array: StyledYAML.inline(%w[ apples bananas oranges ]) | |
} | |
StyledYAML.dump full_data, $stdout | |
__END__ | |
{ |