For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
import random | |
random.sample(range(1,201), 20) |
public static readonly Regex | |
UrlFinder = new Regex(@"ss://(?<base64>[A-Za-z0-9+-/=_]+)(?:#(?<tag>\S+))?", RegexOptions.IgnoreCase), | |
DetailsParser = new Regex(@"^((?<method>.+?):(?<password>.*)@(?<hostname>.+?):(?<port>\d+?))$", RegexOptions.IgnoreCase); |
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
/* | |
* https://myip.ms/view/ip_owners/179248/Aliyun_Computing_Co_Ltd.html | |
res = ""; for (i=0; i<41; i++) { console.log(arr[i].text); res = res + "\n" + arr[i].text; } | |
arr = $("table .JColResizer .row_name a") | |
101.132.0.0 - 101.133.255.255 | |
101.200.0.0 - 101.201.255.255 | |
101.37.0.0 - 101.37.255.255 | |
106.14.0.0 - 106.15.255.255 |
/* | |
249 / 282 test cases passed. | |
Status: Wrong Answer | |
Input: | |
[-2,0,5,-1,-5,5,3] | |
-2 | |
Output: | |
[[-5,-2,0,5],[-2,-1,0,1]] | |
Expected: |
ALTER TABLE beijing_house add column `usage` varchar(16) default NULL; | |
ALTER TABLE `beijing_house` add column `createtime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP; |
== iOS == | |
===Build guide=== | |
* https://github.com/actorapp/actor-bootstrap/tree/master/docs/server | |
== Configuration == | |
===File Storage=== | |
AWS S3 or file system on actor server | |
* AWS S3: https://github.com/actorapp/actor-bootstrap/blob/master/docs/server/configure-s3.md | |
* Steps: [http://roomchat-cn.azurewebsites.net/oss/actor/aws-s3-cors1.jpg],[http://roomchat-cn.azurewebsites.net/oss/actor/aws-s3-cors2.jpg] |
// Hide separator for specific cell is extremely hard in iOS 9. | |
// None of these worked or good enough for me: | |
// http://stackoverflow.com/questions/8561774/hide-separator-line-on-one-uitableviewcell | |
@interface NSPZeroMarginCell : UITableViewCell | |
@property (nonatomic, assign) BOOL separatorHidden; | |
@end |
// No working anyway | |
CGSize screenSz = [UIScreen mainScreen].bounds.size; | |
CGSize leftSz = [self.haveAccountLabel intrinsicContentSize]; | |
CGSize rightSz = [self.signInButton intrinsicContentSize]; | |
CGFloat contentWidth = leftSz.width + rightSz.width + 8; | |
CGFloat x = (screenSz.width - contentWidth) / 2; | |
if (x < 0) { | |
NSLog(@"Text overflow %lf > %lf", contentWidth, screenSz.width); |
var run = 0; | |
var mails = {} | |
total = 3000; //滚动次数,可以自己根据情况定义 | |
function getEmails (cont) { | |
var friendbutton=cont.getElementsByClassName("_ohe"); | |
for(var i=0; i<friendbutton.length; i++) { | |
var link = friendbutton[i].getAttribute("href"); | |
if(link && link.substr(0,25)=="https://www.facebook.com/") { |