| /* | |
| * Handling Errors using async/await | |
| * Has to be used inside an async function | |
| */ | |
| try { | |
| const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
| // Success 🎉 | |
| console.log(response); | |
| } catch (error) { | |
| // Error 😨 |
I’m looking forward to the Sass Fundamentals workshop! A few notes to ensure you’re set up in advance are below.
See you soon!
Mike
You’ll need a relatively recent version (v4.5 or newer, v7 ideally) of node.js installed. On OS X, a great way of doing this without disturbing your existing dev environment is to install NVM. Installation instructions are here.
| SELECT 'SELECT SETVAL(' ||quote_literal(S.relname)|| ', MAX(' ||quote_ident(C.attname)|| ') ) FROM ' ||quote_ident(T.relname)|| ';' | |
| FROM pg_class AS S, pg_depend AS D, pg_class AS T, pg_attribute AS C | |
| WHERE S.relkind = 'S' | |
| AND S.oid = D.objid | |
| AND D.refobjid = T.oid | |
| AND D.refobjid = C.attrelid | |
| AND D.refobjsubid = C.attnum | |
| ORDER BY S.relname; |
This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.
http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL
| #!/usr/bin/env python | |
| #-*- coding: utf-8 -*- | |
| from termcolor import colored | |
| import argparse | |
| import json | |
| import requests | |
| import codecs | |
| import locale | |
| import os |
| print 'Hi!' |

