-
Structure And Interpretation of Computer Programs https://fr.wikipedia.org/wiki/Structure_et_interpr%C3%A9tation_des_programmes_informatiques l'ancien version anglaise au moins est disponible sur l'étoile https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book.html
-
Les vidéos du cours donné sur le sujet au MIT https://www.youtube.com/watch?v=2Op3QLzMgSY choissisez les chapitres qui vous intéressent le plus
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
fx = | |
(fn improver -> improver.(improver) end) | |
.( fn improver -> fn n -> if n == 0, do: 1, else: n * improver.(improver).(n-1) end end ) | |
iex(15)> fx = fn gen -> | |
...(15)> gen.(gen) | |
...(15)> end.( | |
...(15)> fn gen -> | |
...(15)> fn n -> | |
...(15)> fn partial -> |
Operator | Description | Example | Result |
---|---|---|---|
` | ` | concatenation |
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
require 'awesome_print' | |
require 'faraday' | |
module Main extend self | |
def run jenkins_name=nil, first=nil, last=first | |
return usage unless last | |
(first..last).each{ |build| get_console_output_for_build jenkins_name, build } | |
end | |
private |
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
function! s:parse_up_to_prime(pushers, poppers, acc, ele) | |
let [l:result, l:count] = a:acc | |
" run through case | |
if l:count < 0 | |
return a:acc | |
endif | |
call lab42#test#dbg_many(a:ele, a:poppers) | |
let l:increment = ( index(a:pushers, a:ele) >= 0 ? 1 : 0) | |
let l:increment = ( index(a:poppers, a:ele) >= 0 ? -1 : l:increment) |
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
" Gist {{{ | |
command! -range=% -nargs=* Gist :call lab42#buffer#gist(<line1>, <line2>, <f-args>) | |
" }}} |
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
function! lab42#buffer#gist(line1, line2, ...) | |
let l:lines = getline(a:line1, a:line2) | |
if a:0 | |
let l:basename = a:1 | |
else | |
let l:basename = expand("%:t") | |
endif | |
let l:gistfile = '/tmp/' . l:basename | |
call writefile(l:lines, l:gistfile) | |
let l:result = system('gist ' . l:gistfile) |
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
class Calendar | |
class CalendarDate < ::Date | |
module IllegalDate | |
attr_reader :year, :month, :day | |
def to_s | |
"%d-%02d-%02d" % [year, month, day] | |
end | |
end |
brew install rabbitmq
-->
Management Plugin enabled by default at http://localhost:15672
To have launchd start rabbitmq now and restart at login:
brew services start rabbitmq
Or, if you don't want/need a background service you can just run:
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
Given(/^the URL of the platform$/) do | |
@password = something_correct | |
# ... | |
end | |
### | |
### Bad example, just to show the technique | |
### | |
Given (/^the URL of the platform with a bad password$/) do | |
@password = something_less_correct |
NewerOlder