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
    
  
  
    
  | git branch --format ' %(refname:short)' | xargs -n1 -I {} git branch -d {} | 
  
    
      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
    
  
  
    
  | const xpath = "//a[contains(text(),'text')]"; | |
| const matchingElement = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | 
  
    
      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
    
  
  
    
  | git log --first-parent -1 --format="%H" | 
  
    
      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
    
  
  
    
  | #ssh -L{port on your PC}:localhost:{database's port} root@{server IP} | |
| ssh -L3308:localhost:3306 [email protected] | 
  
    
      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 stolen from https://dev.to/aligoren/building-url-shortener-with-mongodb-express-framework-and-typescript-4a71 | |
| function saveClipBoard(text) { | |
| // Textarea allow to use newline("\n") | |
| const textarea = document.createElement('textarea'); | |
| document.body.appendChild(textarea); | |
| textarea.value = text; | |
| textarea.select(); | |
| const success = document.execCommand('copy'); | |
| document.body.removeChild(textarea); | |
| return success; | 
  
    
      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 runWebWorker(func) { | |
| if (typeof func !== "function") { | |
| throw new Error("Argument must be a function"); | |
| } | |
| if (func.name === "") { | |
| throw new Error("Function must have a valid name"); | |
| } | |
| return function (args) { | |
| return new Promise((resolve, reject) => { | |
| const code = ` | 
  
    
      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 { all, call, take } from 'redux-saga/effects'; | |
| import { takeLatest } from 'redux-saga/effects' | |
| import { createStore, compose, applyMiddleware } from 'redux'; | |
| import createSagaMiddleware from 'redux-saga' | |
| //@ts-ignore | |
| import * as MyWorker from "worker-loader!./trywebWorker" | |
| export function WebWorker() { | |
| return new Promise((resolve, reject) => { | |
  
    
      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 { all, call, take } from 'redux-saga/effects'; | |
| import { takeLatest } from 'redux-saga/effects' | |
| import { createStore, compose, applyMiddleware } from 'redux'; | |
| import createSagaMiddleware from 'redux-saga' | |
| export function WebWorker() { | |
| const code = ` | |
| self.addEventListener('message', function (e) { | |
| const str = e.data | 
  
    
      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
    
  
  
    
  | find . -name "*.js" -not -path '*node_modules*' -exec ls {} \; | 
  
    
      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
    
  
  
    
  | ls -d folder-* | xargs -n1 -I {} sh -c 'yarn --cwd {} test|| exit 255' |