- Default behavior for programs is to terminate on an error, or enter the debugger
- Terrible user experience
- Gracefully Handle Errors (retry connections, re-prompt for user input, etc)
- Non Local Control Flow (Display error messages and screens)
I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).
- Launch quicktime player
- do Screen recording
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
(require '[clojure.data.fressian :as fress]) | |
(require '[clojure.java.io :as io]) | |
(import 'java.util.zip.GZIPInputStream) | |
(defn fress-seq* [reader] | |
(let [x (try (fress/read-object reader) (catch Exception e :eof))] | |
(if (= :eof x) | |
(do (.close reader) nil) | |
(cons x |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
body { | |
background-color: #36393B; | |
} | |
svg { | |
position: absolute; |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the\
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
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
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \; |
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
var http = require('http'); | |
var send = require('send'); | |
var urlParse = require('url').parse; | |
var count = 2; | |
var server = http.createServer(function (req, res) { | |
if (!--count) server.close(); // Only allow two connection and then exit. | |
send(req, urlParse(req.url).pathname) | |
.root(__dirname) | |
.pipe(res); |