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 ViewMixin | |
def view_has?(key) | |
false | |
end | |
def view_section(key, contents) | |
# use #view_fetch to render section | |
end | |
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
Noyade: | |
- "<player> s'est noye" | |
- "<player> nage avec les poissons" | |
- "<player> explore les profondeurs" | |
- "<player> s'est pris pour Nemo" | |
Chute: | |
- "<player> a fait une chute mortelle" | |
- "<player> a tente un saut de la foi" | |
- "<player> est tombe de haut, un peu trop haut" | |
Vide: |
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
(defun test (start end) | |
(interactive "r") | |
(print (match-etag (buffer-substring start end)))) | |
; (message (number-to-string | |
; (count-occurence ?e (buffer-substring start end) 0)))) | |
(defun count-occurence (char str accu) | |
(if (= (length str) 0) | |
accu | |
(if (char-equal char (string-to-char str)) |
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
(defun pretty-print1 () | |
(interactive) | |
(beginning-of-buffer) ;; Retourne au debut du buffer | |
(setq level 0) | |
(while (search-forward-regexp "<[^\!]" nil t) | |
(let ((is-ending-tag (is-ending-tag))) | |
(if is-ending-tag | |
(setq level (- level 1))) | |
(indent-before-tag level) | |
(if (not is-ending-tag) |
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
{ | |
"timer": { | |
"major-duration": 120, | |
"minor-duration": 20, | |
"format": "%02d:%02d" | |
}, | |
"lives": 5, | |
"start-duration": 20, | |
"totem-duration": 60, | |
"spawn-duration": 60, |
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
>> id | |
uid=1000(aumgn) gid=1000(aumgn) groups=1000(aumgn),10(wheel),18(dialout),1001(vboxsf) | |
>> ll debug.rb | |
-rw-rw----. 1 aumgn aumgn 10 Oct 31 14:31 debug.rb | |
>> ruby -v | |
rubinius 2.0.0dev (1.9.3 release yyyy-mm-dd JI) [i686-pc-linux-gnu] | |
>> cat debug.rb |
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
Running each benchmark 1000 times. | |
Rehearsal ------------------------------------------------ | |
Grit heads 0.000000 0.410000 0.410000 ( 5.257150) | |
Graal heads 1.150000 0.620000 4.130000 ( 36.643241) | |
--------------------------------------- total: 4.540000sec | |
user system total real | |
Grit heads 0.000000 0.160000 0.160000 ( 4.619689) | |
Graal heads 1.030000 0.590000 2.560000 ( 30.748539) |
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 init_ssh_agent { | |
echo "Initializing new SSH agent..." | |
rm -f /tmp/ssh-agent | |
eval `ssh-agent -a /tmp/ssh-agent` | |
} | |
function setup_existing_ssh_agent { | |
echo "Using existing SSH agent..." | |
export SSH_AUTH_SOCK=/tmp/ssh-agent | |
export SSH_AGENT_PID=$(ps -s -u $USERNAME | grep ssh-agent | cut -d' ' -f4) |
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
public class DemoCommandSet implements CommandSet { | |
@Command(name="noargs") | |
public CommandOutcome noargs(CommandSender sender) { | |
// This command has no argument | |
return CommandOutcome.SUCCESS; | |
} | |
@Command(name="consoleonly") | |
public CommandOutcome consoleOnly(ConsoleCommandSender sender) { |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
OlderNewer