This file contains hidden or 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
~/src/Game_of_Life% git diff | |
diff --git a/script.js b/script.js | |
index a57a343..5045273 100644 | |
--- a/script.js | |
+++ b/script.js | |
@@ -14,12 +14,12 @@ c.lineWidth=2; | |
function addsquare(){ | |
- c.fillRect(302,302,46,46); |
This file contains hidden or 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
// Write a function that prints the n first even numbers starting with 0 | |
function printPilou(y) { | |
function partialPilou(n, i) { | |
if (n == 0) { | |
return | |
} | |
console.log(i); | |
partialPilou(n-1, i+2); | |
} | |
partialPilou(y, 0); |
This file contains hidden or 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
#!/bin/sh | |
# name: mkjail.sh | |
# Creates a minimal environment based on the host binaries. So far | |
# this has only been tested on Fedora27 | |
set -xe | |
default_bins="ls bash env cat less" |
This file contains hidden or 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
ConVarRef dota_workshoptools_limited_ui doesn't point to an existing ConVar | |
Did not detect any valid joysticks. | |
Using AudioQueue Interface | |
Wave sound initialized | |
Trying cache : '/Users/joehakimrahme/Library/Application Support/Steam/SteamApps/common/dota 2 beta/dota/sound/sound.cache' | |
m_mapGameModeDetails contains 0 items | |
Loaded default backpack filters. | |
Restarting sound playback | |
[SteamDatagramClient] Got network config from CDN. Loaded revision 9 OK | |
In logon queue; waiting for GC to confirm connection. |
This file contains hidden or 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
import voluptuous | |
import yaml | |
schema = voluptuous.Schema({ | |
voluptuous.Required("name"): str, | |
"sex": voluptuous.Any("Male", "Female", "N/A"), | |
"class": str, | |
"title": str, | |
"hp": [int], |
This file contains hidden or 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
$ cat index.html | |
<h1>Index file</h1> | |
<p>This is the index.html file.</p> | |
$ cat listing.css | |
h1 {color: red;} | |
$ cat 404error.html | |
<h1>404 File not found!</h1> | |
<p>We couldn't locate the file you're asking for.</p> |
This file contains hidden or 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 load-random-theme () | |
"Load any random theme from the available ones." | |
(interactive) | |
;; disable any previously set theme | |
(if (boundp 'theme-of-the-day) | |
(progn | |
(disable-theme theme-of-the-day) | |
(makunbound 'theme-of-the-day))) |
This file contains hidden or 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
(defn trampoline [func] | |
(defn trampolined-func [*args] | |
(setv f (func *args)) | |
(while (callable f) | |
(setv f (f))) | |
f) | |
trampolined-func) | |
(with-decorator trampoline |
yield
without the do
=> (defn foo [n]
... (if (< n 10) (yield n)))
Traceback (most recent call last):
File "/Users/joehakimrahme/.venv/hy/lib/python2.7/site-packages/hy/importer.py", line 45, in ast_compile
return compile(ast, filename, mode, __future__.CO_FUTURE_DIVISION)
SyntaxError: 'return' with argument inside generator (<console>, line 2)
NewerOlder