Skip to content

Instantly share code, notes, and snippets.

View fxxkscript's full-sized avatar
🎯
Focusing

Ray fxxkscript

🎯
Focusing
View GitHub Profile
@fxxkscript
fxxkscript / Activate Office 2019 for macOS VoL.md
Created September 1, 2022 10:23 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@fxxkscript
fxxkscript / using-eslint-with-prettier.md
Created June 1, 2020 05:38 — forked from yangshun/using-eslint-with-prettier.md
Comparison between tools that allow you to use ESLint and Prettier together.
prettier-eslint eslint-plugin-prettier eslint-config-prettier
What it is A JavaScript module exporting a single function. An ESLint plugin. An ESLint configuration.
What it does Runs the code (string) through prettier then eslint --fix. The output is also a string. Plugins usually contain implementations for additional rules that ESLint will check for. This plugin uses Prettier under the hood and will raise ESLint errors when your code differs from Prettier's expected output. This config turns off formatting-related rules that might conflict with Prettier, allowing you to use Prettier with other ESLint configs like eslint-config-airbnb.
How to use it Either calling the function in your code or via [prettier-eslint-cli](https://github.co
@fxxkscript
fxxkscript / node.md
Last active May 22, 2020 01:30
Node.js 性能调优

Node.js Benchmark

NODE_ENV=production node --prof index.js 会输出isolate日志

node --prof-process isolate-0x102925000-30026-v8.log > processd.txt 解析日志,生成可阅读的格式

node --prof-process --preprocess isolate-0x102925000-30026-v8.log > processd.json 生成json的格式日志,用 v8 里带的 v8/tools/profview/index.html 打开可以解析

做题时间一小时

第一题

O(n^2)

2层For 循环

第二题

@fxxkscript
fxxkscript / React Native Clear Cache
Created October 6, 2018 00:43 — forked from jarretmoses/React Native Clear Cache
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
(function() {
var ec = function(a) {
this.B = a || []
}
;
ec.prototype.set = function(a) {
this.B[a] = !0
}
;
ec.prototype.encode = function() {
@fxxkscript
fxxkscript / linked.js
Created March 1, 2016 08:35
Reverse Linked List
/**
* Definition for singly-linked list.
* function ListNode(val) {
* this.val = val;
* this.next = null;
* }
*/
/**
* @param {ListNode} head
* @return {ListNode}
@fxxkscript
fxxkscript / uuid.js
Created December 17, 2015 07:18
JavaScript uuid
function uuid4() {
var crypto = window.crypto || window.msCrypto;
if (!isUndefined(crypto) && crypto.getRandomValues) {
// Use window.crypto API if available
var arr = new Uint16Array(8);
crypto.getRandomValues(arr);
// set 4 in byte 7
arr[3] = arr[3] & 0xFFF | 0x4000;
@fxxkscript
fxxkscript / build.sh
Created November 19, 2015 07:49
aerospike custom build.sh use xampp php
#!/bin/bash
################################################################################
# Copyright 2013-2015 Aerospike, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@fxxkscript
fxxkscript / whitelist.pac
Last active September 8, 2015 09:30 — forked from janlay/whitelist.pac
A white-list based PAC.
/*
* A white-list based PAC without regexp, by @janlay
* It's just simple and fast.
* Last update: Sep 1, 2016
* Special thanks to @Paveo
*/
function FindProxyForURL(url, host) {
// REPLACE PROXY WITH YOUR OWN'S
var PROXY = "PROXY 127.0.0.1:11111;SOCKS 127.0.0.1:11112";
var DEFAULT = "DIRECT";