(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
-- Create a group | |
CREATE ROLE readaccess; | |
-- Grant access to existing tables | |
GRANT USAGE ON SCHEMA public TO readaccess; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
-- Grant access to future tables | |
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
import datetime | |
import time | |
# some datetime object | |
dt = datetime.datetime.now() | |
# get the seconds since epoch for that datetime | |
print time.mktime(dt.timetuple()) |
from flask import request, make_response, | |
def any_response(data): | |
ALLOWED = ['http://localhost:8888'] | |
response = make_response(data) | |
origin = request.headers['Origin'] | |
if origin in ALLOWED: | |
response.headers['Access-Control-Allow-Origin'] = origin | |
return response |