List of helpful shortcuts for faster coding
If you have any other helpful shortcuts, feel free to add in the comments of this gist :)
const assert = (v, err) => { | |
if (!v) { | |
throw err; | |
} | |
}; | |
let counter = 0; | |
class Promise { | |
constructor(executor) { |
import React, { Component } from 'react' | |
import { ReactDOM, render } from 'react-dom' | |
import { MapComponent, Map, Marker, Popup, TileLayer, GeoJson, LayerGroup, FeatureGroup, Circle } from 'react-leaflet' | |
import { showElevationChart, setZoomSnap, progressEventAction, sendLatLons } from '../actions/applicationActions.js' | |
import { fetchCountyData } from '../actions/countyActions.js' | |
import { fetchRoutes, toggleSelectedRoute, loadRoute, hideRoutes, showRoutes } from '../actions/routesActions.js' | |
import { fetchTrailheadMarkers, getToolTip, setLeafletMarkers, doMarkerSelected } from '../actions/markersActions.js' |
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
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)Here is the list of most commonly used jQuery API functions:
-- PostgreSQL 9.2 beta (for the new JSON datatype) | |
-- You can actually use an earlier version and a TEXT type too | |
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8 | |
-- Inspired by | |
-- http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html | |
-- http://ssql-pgaustin.herokuapp.com/#1 | |
-- JSON Types need to be mapped into corresponding PG types | |
-- |
# First, clear out any old mapnik or node.js installs that might conflict | |
sudo apt-get purge libmapnik libmapnik-dev mapnik-utils nodejs | |
# Also clear out any old ppa's that might conflict | |
sudo rm /etc/apt/sources.list.d/*mapnik* | |
sudo rm /etc/apt/sources.list.d/*developmentseed* | |
sudo rm /etc/apt/sources.list.d/*chris-lea* | |
# add new ppa's | |
echo 'yes' | sudo apt-add-repository ppa:chris-lea/node.js |
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear! | |
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy. | |
* Off the top of my head * | |
1. Fork their repo on Github | |
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it | |
git remote add my-fork [email protected] |