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 | |
set -x | |
export PATH="/bin:/sbin:/usr/sbin:/usr/bin" | |
LOG='/tmp/autoddvpn.log' | |
LOCK='/tmp/autoddvpn.lock' | |
PID=$$ | |
EXROUTEDIR='/jffs/exroute.d' | |
INFO="[INFO#${PID}]" |
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 | |
# Pre-requisites | |
# Add Node.js PPA | |
sudo add-apt-repository ppa:chris-lea/node.js -y | |
# # Install Mongodb | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 -y | |
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list |
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 | |
### BEGIN INIT INFO | |
# Provides: ocserv | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
### END INIT INFO | |
# Copyright Rene Mayrhofer, Gibraltar, 1999 | |
# This script is distibuted under the GPL |
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
route = 8.0.0.0/255.0.0.0 | |
route = 58.0.0.0/255.0.0.0 | |
route = 23.0.0.0/255.0.0.0 | |
route = 117.0.0.0/255.0.0.0 | |
route = 199.0.0.0/255.0.0.0 | |
route = 190.0.0.0/255.0.0.0 | |
route = 198.0.0.0/255.0.0.0 | |
route = 173.0.0.0/255.0.0.0 | |
route = 174.0.0.0/255.0.0.0 | |
route = 168.0.0.0/255.0.0.0 |
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
#utf-8 | |
require 'netaddr' | |
newfile = File.open("some_file", "w") | |
File.foreach('out_ip').with_index { |line, line_num| | |
line = line.split(',')[0].to_s | |
a = NetAddr::CIDR.create(line) | |
puts "#{a.ip}/#{a.wildcard_mask}" | |
newfile.write("route = #{a.ip}/#{a.wildcard_mask}\n") |
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 | |
# Pre-requisites | |
sudo apt-get install software-properties-common -y | |
# Add Node.js PPA | |
sudo add-apt-repository ppa:chris-lea/node.js -y | |
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
00000000 ff d8 ff e0 00 10 4a 46 49 46 00 01 01 00 00 01 JFIF | |
00000010 00 01 00 00 ff db 00 84 00 03 02 02 03 02 02 03 | |
00000020 03 03 03 04 03 03 04 05 08 05 05 04 04 05 0a 07 | |
00000030 07 06 08 0c 0a 0c 0c 0b 0a 0b 0b 0d 0e 12 10 0d | |
00000040 0e 11 0e 0b 0b 10 16 10 11 13 14 15 15 15 0c 0f | |
00000050 17 18 16 14 18 12 14 15 14 01 03 04 04 05 04 05 | |
00000060 09 05 05 09 14 0d 0b 0d 14 14 14 14 14 14 14 14 | |
00000070 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 | |
00000080 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 | |
00000090 14 14 14 14 14 14 14 14 14 14 ff c0 00 11 08 03 |
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
recursive_route_convert = (_value, _key = '/', _stack = ['/'], _strict=false) -> | |
return _.flatten(_.map(_value, (__value, __key) -> | |
__stack = _.clone(_stack) | |
__stack.push(__key) | |
if _.isFunction(__value) | |
http_verb = __stack.splice(__stack.length - 2, 1)[0].toLowerCase() | |
if http_verb not in ['options','get','head','post','put','delete','trace','connect','patch'] | |
throw(new Error("#{http_verb} is not in the HTTP Methods white list")) | |
else | |
strict_url = __stack.join('/').replace(/\/+/g,'/') |
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 | |
# Flush old rules, old custom tables | |
/sbin/iptables --flush | |
/sbin/iptables --flush -t nat | |
/sbin/iptables --delete-chain | |
# Set default policies for all three default chains | |
/sbin/iptables -P INPUT DROP | |
/sbin/iptables -P FORWARD DROP |
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
// | |
// DiaryVerticalTextView.swift | |
// Diary | |
// | |
// Created by kevinzhow on 15/3/6. | |
// Copyright (c) 2015年 kevinzhow. All rights reserved. | |
// | |
import UIKit | |
import CoreText |
OlderNewer