https://github.com/OpenVPN/easy-rsa/tree/master/doc
Init:
wget https://github.com/OpenVPN/easy-rsa/releases/download/3.0.1/EasyRSA-3.0.1.tgz
tar xzvf EasyRSA-3.0.1.tgz
cd EasyRSA-3*
vim vars # var.example
./easyrsa init-pki
https://github.com/OpenVPN/easy-rsa/tree/master/doc
Init:
wget https://github.com/OpenVPN/easy-rsa/releases/download/3.0.1/EasyRSA-3.0.1.tgz
tar xzvf EasyRSA-3.0.1.tgz
cd EasyRSA-3*
vim vars # var.example
./easyrsa init-pki
from numpy import arccos, array, dot, pi | |
from numpy.linalg import det, norm | |
def distance(A, B, P): | |
""" segment line AB, point P, where each one is an array([x, y]) """ | |
if all(A == P) or all(B == P): | |
return 0 | |
if arccos(dot((P - A) / norm(P - A), (B - A) / norm(B - A))) > pi / 2: | |
return norm(P - A) | |
if arccos(dot((P - B) / norm(P - B), (A - B) / norm(A - B))) > pi / 2: |
# -*- coding: utf-8 -*- | |
#test on python 3.4 ,python of lower version has different module organization. | |
import http.server | |
from http.server import HTTPServer, BaseHTTPRequestHandler | |
import socketserver | |
PORT = 8080 | |
Handler = http.server.SimpleHTTPRequestHandler |
The script in this gist will help you buid the Google Protobuf library for use with Mac OS X and iOS. Other methods (such as homebrew or direct compilation) have issues that prevent their use. The libraries built by this script are universal and support all iOS device architectures including the simluator.
The easiest way to use this script is to simply clone the gist onto your
#!/bin/sh | |
# Author: RA <[email protected]> | |
USAGE(){ | |
echo "Usage:$(basename $0) [eng] files..." | |
} | |
[ $# -eq 0 ] && USAGE && exit 0 | |
ERROR(){ |
// If you dont need to call original method | |
$.widget("ui.addresspicker", $.extend({}, $.ui.addresspicker.prototype, { | |
_updatePosition: function(){ | |
// Do what you want to | |
} | |
})); | |
// If you need to call original method | |
var _updatePosition = $.ui.addresspicker.prototype._updatePosition; | |
$.widget("ui.addresspicker", $.extend({}, $.ui.addresspicker.prototype, { |