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
import sys | |
import socket | |
import select | |
import random | |
from itertools import cycle | |
# dumb netcat server, short tcp connection | |
# $ ~ while true ; do nc -l 8888 < server1.html; done | |
# $ ~ while true ; do nc -l 9999 < server2.html; done | |
SERVER_POOL = [('10.157.0.238', 8888)] |
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 | |
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin | |
export PATH | |
#=============================================================================================== | |
# System Required: CentOS6.x/7 (32bit/64bit) or Ubuntu | |
# Description: Install IKEV2 VPN for CentOS and Ubuntu | |
# Author: quericy | |
# Intro: https://quericy.me/blog/699 | |
#=============================================================================================== |
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
angular.module('myApp.services', []) | |
.factory('UserFactory', function($http, $q) { | |
var service = { | |
// our factory definition | |
user: {}, | |
setName: function(newName) { | |
service.user['name'] = newName; | |
}, | |
setEmail: function(newEmail) { | |
service.user['email'] = newEmail; |
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/sh | |
# Notice special chars inside key like / will replace with _ eg. abc/def => abc_def | |
SED=/bin/sed | |
DB=kv.db | |
ensure_db_exist(){ | |
if [ $1 ];then | |
DB=$1 | |
fi | |
if [ ! -f $DB ];then |