A; B
Run A and then B, regardless of success of A
A && B
Run B if A succeeded
A || B
Run B if A failed
A &
Run A in background.
let f ?(x = Some("valeur par default")) () = | |
match x with | |
| Some (y) -> print_string y | |
| None -> print_string "None" | |
;; | |
(* val f : ?x:string option -> unit -> unit = <fun> *) | |
f ();; | |
(* valeur par default- : unit = () *) |
# update package list | |
sudo apt-get update | |
# install samba | |
sudo apt-get install samba samba-common-bin | |
# to use hfs+ file-system | |
sudo apt-get install hfsprogs | |
# list mounted disks, usfull to umount |
tell application "Flint" to activate -- needs to be in front | |
tell application "System Events" to tell application process "Flint" | |
try | |
get properties of window 1 | |
set size of window 1 to {700, 800} | |
set position of window 1 to {1700, 300} | |
end try | |
end tell | |
tell application "Adium" to activate -- needs to be in front |
A; B
Run A and then B, regardless of success of A
A && B
Run B if A succeeded
A || B
Run B if A failed
A &
Run A in background.
#! /usr/bin/env perl | |
use Getopt::Long; | |
my $var1=0; | |
my $var2; | |
my $var3; | |
my $var4; | |
my $options = GetOptions ( | |
"bool" => \$var1, |
#!/usr/bin/env perl | |
my $a = 'foo'; | |
my $b = 'brack'; | |
my $une_condition = 1; | |
if ($une_condition) { | |
my $b = "bar"; | |
print $a; # Affiche "foo" | |
print $b; # Affiche "bar" |
if (typeof jQuery == "undefined") { | |
console.log("Loading jQuery!"); | |
var script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"; | |
document.body.appendChild(script); | |
} else { | |
console.log("Let's rock!"); | |
} |
http://www.phptherightway.com (is translated into many different languages)
http://sql.sh (fr)