This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
This Gist presents a new design of class-based object construction in ES6 that does not require use of the two-phase @@create protocol.
One of the characteristics of this proposal is that subclass constructors must explicitly super invoke their superclass's constructor if they wish to use the base class' object allocation and initialization logic.
An alternative version of this design automatically invokes the base constructor in most situations.
# This is just a cheat sheet: | |
# On production | |
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
# On local | |
scp -C production:~/database.sql.gz | |
dropdb database && createdb database | |
gunzip < database.sql.gz | psql database |
#!/usr/bin/env bash | |
## Author: Abidán Brito | |
## This script builds GNU Emacs 29.1 with support for native elisp compilation, | |
## tree-sitter, libjansson (C JSON library), pure GTK and mailutils. | |
# Exit on error and print out commands before executing them. | |
set -euxo pipefail | |
# Let's set the number of jobs to something reasonable; keep 2 cores |
;;; init.el --- Fun stuff all around -*- lexical-binding: t; -*- | |
;;; Commentary: | |
;; This is a simple init.el which offers a Python configuration. Each package | |
;; usage is annotated with the how and why of its use. `use-package' is used to | |
;; manage the configuration as it provides lots of facilities to load modes, | |
;; define custom variables and key-maps, etc. | |
;;; Code: |