Skip to content

Instantly share code, notes, and snippets.

View fivesmallq's full-sized avatar
🎯
Focusing

fivesmallq fivesmallq

🎯
Focusing
View GitHub Profile
/**
* website搜索.
*
* @param id
* @param q
* @param sort
* @param offset
* @param limit
* @return
*/
@fivesmallq
fivesmallq / StringUtils.java
Created December 29, 2015 10:38
重现 fastjson filter bug
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.parser.deserializer.ExtraProcessor;
import com.alibaba.fastjson.serializer.NameFilter;
import com.alibaba.fastjson.serializer.SerializerFeature;
import org.apache.commons.lang3.Validate;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
思路就是
1. 把wifi设置成优先的default路由
2. 配置内网的网段走有线的网关
3. 除了有线的, 自然就是走wifi default了
走起.
@fivesmallq
fivesmallq / mkgit-centos6.sh
Last active September 19, 2017 10:55 — forked from eyecatchup/mkgit-centos6.sh
Bash script to install the latest Git version on CentOS 6.x.
#!/usr/bin/env bash
# Install the latest version of git on CentOS 6.x
# Install Required Packages
sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
sudo yum install gcc perl-ExtUtils-MakeMaker
# Uninstall old Git RPM
sudo yum remove git
@fivesmallq
fivesmallq / How To Install OpenCV 3.3+ with Java on Mac
Created September 19, 2018 07:27
How To Install OpenCV 3.3+ with Java on Mac
How To Install OpenCV 3.3+ with Java on Mac
03 Nov, 2017 • I spent a couple hours trying to resolve an UnsatisfiedLinkError with OpenCV and Java on Mac, I found the solution.
If after installing OpenCV on Mac via brew, such as by using
brew install opencv
Then you may be getting an error when trying to use `System.loadLibrary(Core.NATIVE_LIBRARY_NAME)` that says something like:
UnsatisfiedLinkError: no opencv_java331 in java.library.path
The solution to this is to reinstall OpenCV with the proper Java libs. Try the following steps:
@fivesmallq
fivesmallq / README-Template.md
Created January 30, 2019 06:54 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@fivesmallq
fivesmallq / outline-server-setup.md
Created February 12, 2019 03:59 — forked from okeehou/outline-server-setup.md
How to setup an Outline VPN Server on Ubuntu 16.04

How to setup an Outline VPN Server on Ubuntu 16.04 Server

This guide will show you how to install Outline Server on an Ubuntu 16.04 Server, use Outline Manager for Windows and connect to your Outline Server on Windows and Anroid.

Install Outline Manager

Outline Manager supports Windows, macOS and Linux.

Outline Manager for Windows

{
"button": [
{
"type": "miniprogram",
"name": "纳良策",
"url": "https://j.youzan.com/x3wvu9",
"appid": "wxb8f2fbd6fb477716",
"pagepath": "pages/home/dashboard/index"
},
{
{
"button": [
{
"type": "miniprogram",
"name": "纳良策",
"url": "https://j.youzan.com/x3wvu9",
"appid": "wxb8f2fbd6fb477716",
"pagepath": "pages/home/dashboard/index"
},
{
@fivesmallq
fivesmallq / ThreadPool.md
Created June 20, 2022 05:43 — forked from JonCole/ThreadPool.md
Intro to CLR ThreadPool Growth

ThreadPool Growth: Some Important Details

The CLR ThreadPool has two types of threads - "Worker" and "I/O Completion Port" (aka IOCP) threads.

  • Worker threads are used when for things like processing Task.Run(…) or ThreadPool.QueueUserWorkItem(…) methods. These threads are also used by various components in the CLR when work needs to happen on a background thread.
  • IOCP threads are used when asynchronous IO happens (e.g. reading from the network).

The thread pool provides new worker threads or I/O completion threads on demand (without any throttling) until it reaches the "Minimum" setting for each type of thread. By default, the minimum number of threads is set to the number of processors on a system.

Once the number of existing (busy) threads hits the "minimum" number of threads, the ThreadPool will throttle the rate at which is injects new threads to one thread per 500 milliseconds. This means that if your system gets a burst of work needing an IOCP thread, it will proces