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
(ns nightclazz.gameOfLife | |
(:require [quil.core :as q])) | |
;; generation: | |
(def world (atom | |
#{[0 1] [1 2] [1 1] [1 3]})) | |
(defn setup [] | |
(q/smooth) | |
(q/background 30)) |
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
# install '.deb' package (local file) | |
dpkg -i my-package | |
# list installed packages | |
dpkg-query -W | |
# list installed ('ii' marker) and not installed ('un') packages | |
dpkg -l | |
# list available packages |
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
out = new File("C:/tmp/output.txt") | |
out.write "-- Dummy file header\n" | |
for (index in 1..5) { | |
out.append "line${index}\n" | |
} | |
println "Generated file ${out}." |
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
# File basics: | |
############################ | |
# list files, sorted by update date (recent last) | |
ls -rclt | |
# list files, sorted by update date (recent first) | |
ls -clt | |
# (recursive) folder sizes | |
du -h -d1 # human-readable sizes + dir depth of 1 |
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
(defn lazy-inc [x] | |
(lazy-seq | |
(print ".") | |
(cons x (lazy-inc (inc x))))) | |
(print "\n take 2: ") | |
(take 2 | |
(lazy-inc 1)) | |
(print "\n first: ") |
NewerOlder