This file contains 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
//Include in your service's scripts folder. Add a reference to it in manifests.json under the "scripts" object. | |
'use strict'; | |
const manager = require('@arangodb/foxx/manager'); | |
const { get } = require('lodash'); | |
const fs = require('fs'); | |
const Minimatch = require('minimatch').Minimatch; | |
const isWindows = require('internal').platform.substr(0, 3) === 'win'; | |
const mocha = require('@arangodb/mocha'); |
This file contains 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
<!--views/account.ejs--> | |
<p>ID: <%= user.id %></p> | |
<p>Name: <%= user.name %></p> |
This file contains 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
# /etc/sysctl.d/90-firewall.conf | |
# Turn on Source Address Verification in all interfaces to | |
# prevent some spoofing attacks | |
net.ipv4.conf.all.rp_filter=1 | |
# Uncomment the next line to enable TCP/IP SYN cookies | |
net.ipv4.tcp_syncookies=1 | |
net.ipv4.tcp_max_syn_backlog = 2048 | |
net.ipv4.tcp_synack_retries = 2 |
This file contains 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
#!/bin/bash | |
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 |
This file contains 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
#!/bin/bash | |
ccred=$(echo -e "\033[0;31m") | |
ccyellow=$(echo -e "\033[0;33m") | |
ccgreen=$(echo -e "\033[0;32m") | |
ccend=$(echo -e "\033[0m") | |
exit_code=0 | |
cd "$(git rev-parse --show-toplevel)" |
This file contains 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
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 () |
This file contains 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
/** | |
* 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) { |