Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

feng qijun jun1st

🎯
Focusing
Block or report user

Report or block jun1st

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View eslint.js
module.exports = {
env: {
// 指定脚本的运行环境。每种环境都有一组特定的预定义全局变量
es6: true,
node: true,
jest: true,
'react-native/react-native': true,
},
extends: [
// 一个配置文件可以从基础配置中继承已启用的规则
View tsconfig.json
{
"compilerOptions": {
/* Basic Options */
"target": "es5",
"module": "commonjs",
"allowJs": true,
"checkJs": true,
"jsx": "react-native",
"strict": true,
"allowSyntheticDefaultImports": true,
View disable mcafee endpoint protection.md

method 1

sudo /usr/local/McAfee/AntiMalware/VSControl stopoas

alternatively

sudo defaults write /Library/Preferences/com.mcafee.ssm.antimalware.plist OAS_Enable -bool False
sudo /usr/local/McAfee/AntiMalware/VSControl stop
sudo /usr/local/McAfee/AntiMalware/VSControl reload
View surf.config
[General]
loglevel = notify
interface = 127.0.0.1
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local
ipv6 = false
dns-server = system, 114.114.114.114
exclude-simple-hostnames = true
enhanced-mode-by-rule = true
[Proxy]
@jun1st
jun1st / partition.txt
Last active Feb 19, 2019
quick sort partition example
View partition.txt
arr[] = {10, 80, 30, 90, 40, 50, 70}
Indexes: 0 1 2 3 4 5 6
low = 0, high = 6, pivot = arr[h] = 70
初始化, i = -1, i 保存的是最近一次比较比 pivot 值小的index。
遍历 from j = low to high-1
j = 0 : arr[j] <= pivot, do i++ and swap(arr[i], arr[j])
i = 0
arr[] = {10, 80, 30, 90, 40, 50, 70} // i = j, 本身不需要交换
@jun1st
jun1st / partition.java
Last active Feb 19, 2019
Quick Sort Partition
View partition.java
public static int partition(int arr[], int low, int high) {
int pivot = arr[high];
// index of smaller element
int i = (low -1);
for(int j = low; j < high; j++) {
if (arr[j] <= pivot) {
i++;
int temp = arr[i];
@jun1st
jun1st / mergeSort.java
Last active Jan 31, 2019
merge sort java version
View mergeSort.java
public static void merge(int[] arrayOne, int aLeft, int aRight,
int[] arrayTwo, int bLeft, int bRight,
int[] result) {
int i = aLeft, j = bLeft;
for(int k = 0; k <= aRight - aLeft + bRight - bLeft + 1; k++) {
if (i > aRight) { //第一个数组没有元素了
result[k] = arrayTwo[j++];
continue;
}
View AWS4SignResult.java
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.Date;
@Data
@Accessors(chain = true)
public class AWS4SignResult {
private String amzDateTimeStamp;
View gist:40a4109b523a82d19e7c2e5ece2922e6
# 头部描述信息(可选)
# 在 PCL 的头部一般添加上本文件和作者的描述信息,在 Potatso App 中暂时没有实际作用。
name = "Potatso Sample Configuration"
author = "Potatso"
email = "potatso.com@gmail.com"
website = "http://manual.potatso.com"
description = "The sample PCF. This demonstrates the basic grammar of defining a PCL."
# 用户配置(Profile)
[PROFILE.sample]
@jun1st
jun1st / AES.java
Last active Jul 7, 2018
Java decode 小程序 encryptedData
View AES.java
import java.io.UnsupportedEncodingException;
import java.security.AlgorithmParameters;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.Key;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.Security;
You can’t perform that action at this time.