start new:
tmux
start new with session name:
tmux new -s myname
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
mongodump -h xxx11.mlab.com:11 -u user -p password --authenticationDatabase release-db -d release-db -o /home/dumps
**Options** `-h`: mlab host:port, `-u`: db user, `-p`: db user password, `--authenticationDatabase` `-d`: mlab dbname, `-o`: path to store backupfiles
restore command, to restore locally
mongorestore --db dname /home/dumps
Otherwise to restore in mlab, create a new db and replace the options
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.
First of all, please note that token expiration and revoking are two different things.
A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.
Quoted from JWT RFC:
| postgres: | |
| image: postgres:9.4 | |
| volumes: | |
| - ./init.sql:/docker-entrypoint-initdb.d/init.sql |
| server { | |
| listen 80; | |
| listen [::]:80 default server ipv6only=on; | |
| location / { | |
| proxy_intercept_errors on; | |
| proxy_pass http://localhost:9000; | |
| } | |
| error_page 500 502 503 504 /50x.html; |
| #!/usr/bin/env ruby | |
| # | |
| # Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0156) | |
| # | |
| # ## Advisory | |
| # | |
| # https://groups.google.com/forum/#!topic/rubyonrails-security/61bkgvnSGTQ/discussion | |
| # | |
| # ## Caveats | |
| # |
| #!/usr/bin/python | |
| from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
| PORT_NUMBER = 8080 | |
| PUBLIC_ENTRY = './public/index.html' | |
| # This class will handles any incoming request | |
| class handleRoutes(BaseHTTPRequestHandler): | |
| # Handler for the GET requests | |
| def do_GET(self): |
| //var csv is the CSV file with headers | |
| function csvJSON(csv){ | |
| var lines=csv.split("\n"); | |
| var result = []; | |
| var headers=lines[0].split(","); | |
| for(var i=1;i<lines.length;i++){ |