Skip to content

Instantly share code, notes, and snippets.

🐽
Prepping for a frontend bootcamp for Microsoft

Kenneth Chau kenotron

🐽
Prepping for a frontend bootcamp for Microsoft
  • Microsoft
Block or report user

Report or block kenotron

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
@kenotron
kenotron / create-react-app-uifabric
Last active Apr 30, 2019
Patch create-react-app to use UI Fabric
View create-react-app-uifabric
git clone https://github.com/kenotron/create-react-app-uifabric.git
cd create-react-app-uifabric
yarn
yarn start
View create-react-app-uifabric.diff
diff --git a/package.json b/package.json
index af283fb..abbbd11 100644
--- a/package.json
+++ b/package.json
@@ -7,6 +7,8 @@
"@types/node": "11.13.8",
"@types/react": "16.8.15",
"@types/react-dom": "16.8.4",
+ "office-ui-fabric-react": "^6.174.0",
+ "@uifabric/fluent-theme": "^0.16.7",
@kenotron
kenotron / set-gc.js
Created Oct 1, 2017
Sets causing tons of GC
View set-gc.js
const map = new Map();
const set = new Set();
const MAX_KEYS = 10 * 1024 * 1024;
const SET_KEYS = 10 * 1024 * 1024;
console.log("Call map.set() a LOT");
for (let i = 0; i < MAX_KEYS; i++) {
map.set(i, i);
}
View gist:8c4b0f70ecacf37d207853b40d0ddbed
import {observable} from '../src/api/observable';
import {ObservableValue} from '../src/types/observableValue';
import {IDerivation, IDerivationState, trackDerivedFunction} from '../src/core/derivation';
import {IObservable} from '../src/core/observable';
var store = observable({
foo: {
baz: {
test: "value1"
}
@kenotron
kenotron / karabiner.json
Last active Sep 22, 2016
.karabiner.d/configuration/karabiner.json
View karabiner.json
{
"profiles": [
{
"name": "Default profile",
"selected": true,
"simple_modifications": {
"keypad_1": "end",
"keypad_3": "page_down",
"keypad_7": "home",
"keypad_9": "page_up",
View gist:349bf6fef00eeb5a7eaf2d986ba1b820
# I just add these as steps as tasks inside a VSTS build def
npm set always-auth
npm set email xxxx@yyyy.com
...
# Caveats:
# 1. now your npm config is DIRTY globally - only one of these creds can be active at a time
# 2. VSTS has a notion of "secure variable" that can be exposed env variables (write only) not sure if Jenkins has similar feature
You can’t perform that action at this time.