This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias glog="git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| console.clear(); | |
| class TNode { | |
| public left: TNode|undefined; | |
| public right: TNode|undefined; | |
| constructor(public value: number) {} | |
| } | |
| const root = new TNode(1) | |
| const n2 = new TNode(2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function fib(n) { | |
| if(n === 1 || n === 2) { | |
| return 1; | |
| } | |
| return fib(n - 1) + fib(n - 2); | |
| } | |
| function fibMemo(n , memo) { | |
| if(memo.get(n)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 'use strict' | |
| let callback = null; | |
| function observe(data) { | |
| const subscribers = {}; | |
| return new Proxy(data, { | |
| set(obj, key, value) { | |
| obj[key] = value; | |
| if (subscribers[key]) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| 'babel-plugin-rewrite-require', | |
| { | |
| aliases: { | |
| crypto: 'crypto-browserify', | |
| stream: 'readable-stream', | |
| vm: 'vm-browserify', | |
| }, | |
| }, | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (__DEV__) { | |
| global.XMLHttpRequest = global.originalXMLHttpRequest ? | |
| global.originalXMLHttpRequest : | |
| global.XMLHttpRequest; | |
| global.FormData = global.originalFormData ? | |
| global.originalFormData : | |
| global.FormData; | |
| global.Blob = global.originalBlob ? | |
| global.originalBlob : | |
| global.Blob; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo chown -R $USER:$GROUP /tmp/metro-cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt install pkg-config | |
| sudo apt install libssl-dev | |
| ./autogen.sh | |
| ./configure --without-python --without-pcre --enable-lenient | |
| make | |
| sudo make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'zone.js' | |
| import {Subject} from 'rxjs'; | |
| const render = new Subject(); | |
| const input = document.querySelector('#input') as HTMLInputElement; | |
| Zone.current.fork({ | |
| name: 'my first cool zone', | |
| onInvokeTask(parentZoneDelegate, _, targetZone, task, applyThis, applyArgs) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| PASSWORD=<userpassword> | |
| BASE32_TOKEN=<BASE32 SECRET> | |
| HOST=vpn.some.com | |
| # topt token generation | |
| # tools can be get here https://www.nongnu.org/oath-toolkit/ | |
| # also don't forget to set current time | |
| # this method is using is in case if "token" and "password" swapped |
NewerOlder