Skip to content

Instantly share code, notes, and snippets.

Avatar
🤔
🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔

Dimitar Nestorov dimitarnestorov

🤔
🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am dimitarnestorov on github.
  • I am dimitarnestorov (https://keybase.io/dimitarnestorov) on keybase.
  • I have a public key ASD5qnTxm2XMIyy4nNaS5dPxzQzWiiNM-0zxYcQR4H-NIQo

To claim this, I am signing this object:

@dimitarnestorov
dimitarnestorov / react-devtools+4.7.0.patch
Last active Jun 17, 2020
React DevTools npm dark patch
View react-devtools+4.7.0.patch
diff --git a/node_modules/react-devtools/app.html b/node_modules/react-devtools/app.html
index 75fc137..bfc3c1b 100644
--- a/node_modules/react-devtools/app.html
+++ b/node_modules/react-devtools/app.html
@@ -12,7 +12,7 @@
height: 100%;
margin: 0;
padding: 0;
- background-color: #fff;
+ background-color: #000;
@dimitarnestorov
dimitarnestorov / shell.md
Last active Oct 21, 2019
Why it is called that way
View shell.md

cd - change directory

ls - list directory contents

cp - copy files

man - format and display the on-line manual pages

mv - move files

View gist:360b6ea0fd5e17e0f01d5d27407ad7e4
https://apps.apple.com/app/macos-catalina/id1466841314?mt=12
https://apps.apple.com/app/macos-mojave/id1398502828?ls=1&mt=12
https://apps.apple.com/app/macos-high-sierra/id1246284741?ls=1&mt=12
https://apps.apple.com/app/macos-sierra/id1127487414?ls=1&mt=12
https://apps.apple.com/app/os-x-el-capitan/id1147835434?mt=12
@dimitarnestorov
dimitarnestorov / tsts.ts
Created Apr 23, 2019
TypeScript toolset
View tsts.ts
type PromiseType<T> = T extends Promise<infer U> ? U : T
// const myPromise = new Promise<string>(() => {})
// type MyPromiseType = PromiseType<typeof myPromise> // string
@dimitarnestorov
dimitarnestorov / code.js
Last active Feb 24, 2019
hash code pizza practice problem
View code.js
const fs = require('fs')
const file = fs.readFileSync('./a_example.in', 'utf8')
// const file = fs.readFileSync('./b_small.in', 'utf8')
function cloneArray(arr) {
return arr.slice(0)
}
function cloneMatrix(arr) {
View useStateRef.js
import { useState, useCallback } from 'react';
function useStateRef(initialValue) {
const [ref, setState] = useState(initialValue)
const callback = useCallback(
ref => {
setState(ref)
},
[ref, setState]
View droppable.tsx
import * as csx from "csx";
import { types } from "dovetail/graphql";
import { NoteGroupColor } from "dovetail/types";
import { NoteSortDropdownChoice } from "dovetail/ui/dropdown/NoteSortDropdown";
import { OutsideClick } from "dovetail/ui/layout/OutsideClick";
import { NewNoteItem } from "dovetail/ui/note";
import { CreateNoteItem } from "dovetail/ui/note/CreateNoteItem";
import { Cache } from "dovetail/ui/util/Cache";
import { makeStyleSafe } from "dovetail/util/reactBeautifulDnd";
import * as text from "dovetail/util/text";
@dimitarnestorov
dimitarnestorov / angularapp.js
Last active May 2, 2018
@sentry/electron support for AngularJS
View angularapp.js
const sentry = require('./sentry.js').moduleName;
angular.module('app', ['your', 'dependencies', sentry]);
@dimitarnestorov
dimitarnestorov / TokenList.js
Created Dec 26, 2017
Simplified custom DOMTokenList implementation.
View TokenList.js
const forEach = Array.prototype.forEach;
module.exports = class TokenList {
constructor(){
this.tokens = {};
this.add.apply(this, arguments);
}
add(){
const { tokens } = this;