(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Visual Studio Code allows Snippets to perform ✨Variable Transforms✨ using Regex.
Here are some common case transformations that you can apply to your snippets. In these examples, I'm using $TM_FILENAME_BASE
, but the same transformations should apply to any of the Snippet Variables.
snippets-from-delimited.json
can convert filenames like my-file-name
, my_file_name
, my file name
. If your filename is delimited by a dash, underscore, or space, these should work.
snippets-from-mixed-case.json
can convert filenames like myFileName
and MyFileName
. If your filename is in camel
or Pascal
case, these should work.
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)#!/usr/bin/env bash | |
# | |
# Bootstrap script for setting up a new OSX machine | |
# | |
# This should be idempotent so it can be run multiple times. | |
# | |
# Some apps don't have a cask and so still need to be installed by hand. These | |
# include: | |
# | |
# - Twitter (app store) |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
# | |
# Matches a state to its timezone (if it has only one). | |
# | |
# Commented out fields mean that the state | |
# has multiple timezones or was unknown at the time. | |
# | |
# @author Aaron Zampaglione <azampagl@azampagl.com> | |
# @copyright 2011 Aaron Zampaglione | |
# @license MIT | |
# |
# Version key/value should be on his own line | |
PACKAGE_VERSION=$(cat package.json \ | |
| grep version \ | |
| head -1 \ | |
| awk -F: '{ print $2 }' \ | |
| sed 's/[",]//g') | |
echo $PACKAGE_VERSION |
// https://gist.github.com/edoardocavazza/47246856759f2273e48b | |
(function () { | |
if (typeof Object.setPrototypeOf === 'undefined' && typeof Object.getOwnPropertyNames === 'function') { | |
var _exclude = ['length', 'name', 'arguments', 'caller', 'prototype']; | |
function bindFunction(ctx, fn) { | |
return function() { | |
return fn.apply(this, arguments); | |
} | |
} |
#!/bin/bash | |
# A simple script to backup an organization's GitHub repositories. | |
#------------------------------------------------------------------------------- | |
# NOTES: | |
#------------------------------------------------------------------------------- | |
# * Under the heading "CONFIG" below you'll find a number of configuration | |
# parameters that must be personalized for your GitHub account and org. | |
# Replace the `<CHANGE-ME>` strings with the value described in the comments | |
# (or overwrite those values at run-time by providing environment variables). |
This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.
Agree? Disagree? Feel free to let me know at @JanStette. See also my blog at www.janvsmachine.net.
Keep it simple, stupid. You ain't gonna need it.