Instantly share code, notes, and snippets.

Aditya Mukhopadhyay adityamukho

View GitHub Profile

README is empty

View account.ejs
<p>ID: <%= %></p>
<p>Name: <%= %></p>
View 90-firewall.conf
# /etc/sysctl.d/90-firewall.conf
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
# Uncomment the next line to enable TCP/IP SYN cookies
net.ipv4.tcp_max_syn_backlog = 2048
net.ipv4.tcp_synack_retries = 2
pacman -S nginx
export JAIL=/srv/http
# Create Necessary Devices
mkdir $JAIL/dev
mknod -m 0666 $JAIL/dev/null c 1 3
mknod -m 0666 $JAIL/dev/random c 1 8
mknod -m 0444 $JAIL/dev/urandom c 1 9
ccred=$(echo -e "\033[0;31m")
ccyellow=$(echo -e "\033[0;33m")
ccgreen=$(echo -e "\033[0;32m")
ccend=$(echo -e "\033[0m")
cd "$(git rev-parse --show-toplevel)"
public class AuthFilter implements Filter
private static final boolean debug = false;
// The filter configuration object we are associated with. If
// this value is null, this filter instance is not currently
// configured.
private FilterConfig filterConfig = null;
public AuthFilter ()
View User.js
* api/models/User.js
* The user model contains the instance method for validating the password.
var bcrypt = require('bcrypt');
function hashPassword(values, next) {
bcrypt.hash(values.password, 10, function(err, hash) {