Open Terminal.
Paste the text below, substituting in your email address.
ssh-keygen -t rsa -b 4096 -C "[email protected]" This creates a new ssh key, using the provided email as a label.
Generating public/private rsa key pair.
list_id: "list1", | |
category: "What's New", | |
products: [ | |
{ | |
product_id: "223344ffdds3ff3", | |
sku: "12345", | |
name: "Just Another Game", | |
price: 22, | |
position: 2, | |
category: "Games and Entertainment", |
Open Terminal.
Paste the text below, substituting in your email address.
ssh-keygen -t rsa -b 4096 -C "[email protected]" This creates a new ssh key, using the provided email as a label.
Generating public/private rsa key pair.
Updating global packages | |
To update global packages, you can use npm update -g <package>: | |
npm update -g jshint | |
To find out which packages need to be updated, you can use npm outdated -g --depth=0. | |
To update all global packages, you can use npm update -g. However, for npm versions less than 2.6.1, this script is recommended to update all outdated global packages. | |
import csv | |
import pprint | |
# opens csv file and assingns it to an object | |
with open('data-text.csv') as csvfile: | |
# Use Sniffer to figure out csv dialect | |
dialect = csv.Sniffer().sniff(csvfile.read(1024)) | |
csvfile.seek(0) | |
# pass the dialect to filereader to read the file | |
reader = csv.reader(csvfile, dialect) |
ps aux | grep -i runserver | |
kill (pid) |
cities = ['Dublin', 'Amsterdam', 'Helsinki', 'London'] | |
# Bad way to to walk trough the list print them and their location on the list | |
i = 0 | |
for city in cities: | |
print(i, city) | |
i += 1 | |
# Good way is to use enumerate function. | |
# Enumerate documentation at: https://docs.python.org/3/library/functions.html#enumerate |
# Meteor files to ignore now handled by .ignore file within .Meteor folder automatically | |
# settings file to ignore to protect API keys | |
settings.json | |
# MUP / MUPX file to ignore to protect server passwords and sensitive info. | |
mup.json | |
# npm package files to ignore | |
node?modules/ |
kill -9 $(lsof -i tcp:3000 -t) |
You manipulate postgres through the user postgres, as so: | |
# su - postgres | |
$ createdb mydb | |
$ psql -s mydb | |
# create user someuser password 'somepassword'; | |
# GRANT ALL PRIVILEGES ON DATABASE mydb TO someuser; |