This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // the main app file | |
| import express from "express"; | |
| import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db) | |
| import authenticate from "./authentication"; // middleware for doing authentication | |
| import permit from "./authorization"; // middleware for checking if user's role is permitted to make request | |
| const app = express(), | |
| api = express.Router(); | |
| // first middleware will setup db connection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // config/passport.js | |
| // load all the things we need | |
| var LocalStrategy = require('passport-local').Strategy; | |
| var mysql = require('mysql'); | |
| var connection = mysql.createConnection({ | |
| host : 'localhost', | |
| user : 'root', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ! type "brew" > /dev/null; then | |
| ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"; | |
| fi | |
| brew cask install vagrant; | |
| brew cask install virtualbox; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*! = $rembase: 14px | |
| -------------------------------------------------------------- | |
| * hmtl { font-size: 87.5%; } | |
| * body { font-size: 14px; font-size: 1rem; line-height: 1; } | |
| * 4px 0.28571429rem | |
| * 8px 0.571428571rem | |
| * 12px 0.857142857rem | |
| * 13px 0.928571429rem | |
| * 14px 1rem | |
| * 16px 1.142857143rem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| # ip_lookup.py by poteto | |
| # | |
| # Batch processes many IP addresses, and traces their geolocation. | |
| # The script outputs a .txt file which is then renamed to .csv, and is usable in Excel | |
| # | |
| # Use: | |
| # 1. Save your user email and IP addresses in a .csv file | |
| # - Each email and IP should be in its own column in Excel (or separated by commas) | |
| # - Enter the name of your .csv file: |
NewerOlder