create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| #!/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 | |
| # |
| 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; |
| //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++){ |
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.
| /** | |
| * = Recursive descent parser = | |
| * | |
| * MIT Style License | |
| * By Dmitry Soshnikov <dmitry.soshnikov@gmail.com> | |
| * | |
| * In this short lecture we'll cover the basic (non-predictive, backtracking) | |
| * recursive descent parsing algorithm. | |
| * | |
| * Recursive descent is an LL parser: scan from left to right, doing |
| #! /bin/bash | |
| ################################################################################# | |
| # File Name : cycle_audio_output.sh | |
| # Created By : jguer | |
| # Creation Date : [2016-01-16 22:55] | |
| # Last Modified : [2016-01-17 00:42] | |
| # Description : Cycles audio output devices | |
| ################################################################################# | |
| VERBOSITY=0 | |
| NOTIFICATIONS=0 |
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
| #!/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): |