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
# A list of available STUN server. | |
stun.l.google.com:19302 | |
stun1.l.google.com:19302 | |
stun2.l.google.com:19302 | |
stun3.l.google.com:19302 | |
stun4.l.google.com:19302 | |
stun.ekiga.net | |
stun.ideasip.com | |
stun.iptel.org |
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
#!/usr/bin/env bash | |
sudo apt-get install gcc dpkg-dev cdbs automake autoconf libtool make libssl-dev libsasl2-dev git python-lxml pkg-config | |
git clone git://github.com/mongodb/mongo-c-driver.git | |
cd mongo-c-driver | |
./build/mci.sh --notest --enable-ssl | |
cd .. | |
sudo dpkg --install libmongoc-*.deb libbson-*.deb |
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
var moment = require('moment'), | |
crypto = require('crypto'); | |
function getICEServerJSON(username) { | |
var ttl = 86400; | |
var expiry = moment().add(ttl, 'seconds').unix(); | |
var usernameToken = expiry + ":" + username; | |
var secret = "mysupersecret"; | |
var nonce = crypto.createHmac("sha1", secret).update(usernameToken).digest("base64"); |
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 | |
# INSTRUCTIONS | |
# After generating the OpenVPN server certificates, download and unzip then run this script in the same directory. | |
# Don't forget to chmod +x fastest-server.sh after downloading | |
# | |
# To test all servers with UK in the name | |
# sudo ./fastest-server.sh UK | |
# To test all servers with USA in the name | |
# sudo ./fastest-server.sh USA |
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 | |
USERNAME=$1 | |
if [[ "$USERNAME" == "" ]]; then | |
echo "ERROR: No username specified!" | |
echo "USAGE: $0 <username>" | |
exit 1 | |
fi |
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
# Do not pull default route | |
route-nopull | |
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 | |
REMOTE_CRT="/etc/ssl/certs/squidCA.crt" | |
REMOTE_URL="root@192.168.20.1" | |
FILENAME=`basename "$REMOTE_CRT"` | |
LOCAL_CRT="/tmp/$FILENAME" | |
KEYCHAIN="$HOME/Library/Keychains/login.keychain" | |
# More information about this here: | |
# http://lists.apple.com/archives/macos-x-server/2008/Feb/msg00187.html | |
SECURITY_TYPE="trustAsRoot" |
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 | |
VOLUME_NAME="LinuxServer" | |
REMOTE_USER=`whoami` | |
REMOTE_SERVER="xx.xx.xx.xx" | |
MOUNT_DIR="$HOME/$VOLUME_NAME" | |
REMOTE_DIR="/home/$REMOTE_USER" | |
SSH_KEY="$HOME/.ssh/id_rsa" | |
TIMEOUT=5 |
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 | |
FILE="CATEGORIES" | |
REDIS_KEY="categories" | |
while read line; do | |
category=`echo "$line" | cut -f1 -d'-'` | |
description=`echo "$line" | cut -f2 -d'-'` | |
redis-cli hset "$REDIS_KEY" "$category" "$description" | |
done < "$FILE" |
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
var request = require('request'); | |
var url1 = 'http://vanamco.com/ghostlab/'; | |
//var url = 'http://httpbin.org/get'; | |
var proxyUrl = 'http://127.0.0.1:3128'; | |
var proxiedRequest = request.defaults({'proxy': proxyUrl}); | |
console.log('Making a test request to',url1); | |
proxiedRequest(url1, function (error, response, body) { |
OlderNewer