Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View masterT's full-sized avatar

Simon Thiboutôt masterT

View GitHub Profile
@masterT
masterT / ex1.ml
Last active April 26, 2016 20:55
Ocaml Examples
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 = () *)
@masterT
masterT / instructions.bash
Created December 9, 2015 06:00
Samba setup for Raspberry Pi Raspbian 8 (jessie)
# 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
@masterT
masterT / setup-WxH.applescript
Created November 13, 2015 19:44 — forked from rfunduk/setup-WxH.applescript
Example AppleScript for re-arranging commonly used windows for a screen resolution. Eg. switching between laptop at 1440x900 and external monitor at 2560x1440 is a big pain, requiring a lot of moving around and resizing of windows. So instead you adapt this script, make a setup-1440x900.applescript and a setup-2560x1440.applescript, and run them…
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
@masterT
masterT / concat_command_bash.md
Created November 11, 2015 13:48
Concat bash command

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 &amp; Run A in background.

@masterT
masterT / ex1.pl
Created October 21, 2015 23:57
Lab 5
#! /usr/bin/env perl
use Getopt::Long;
my $var1=0;
my $var2;
my $var3;
my $var4;
my $options = GetOptions (
"bool" => \$var1,
@masterT
masterT / exercice3.pl
Last active October 21, 2015 23:56
Lab 4 Intro au language Perl
#!/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"
@masterT
masterT / add-jquery.js
Last active August 26, 2015 15:17
Add jQuery
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!");
}
@masterT
masterT / info.md
Last active December 21, 2015 15:03
Count SMS

SMS count

160 characters per sms

@
Δ
SP
0
¡
@masterT
masterT / list.md
Created May 13, 2015 14:48
I want to learn (beyond school)
@masterT
masterT / List.md
Last active August 29, 2015 14:19
Productivity

CLI tools

  • Git
  • Rbenv
  • RubyGems

Apps

  • iTerm
  • BetterTouchTool
  • Alfred
  • CCleaner