Jest Mock Any Property on Window Utility - with automatic cleanup.
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
| Add the following in .zshrc: | |
| ... | |
| plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl) | |
| ... | |
| ### Fix slowness of pastes with zsh-syntax-highlighting.zsh | |
| pasteinit() { | |
| OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]} | |
| zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`? |
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
| catchError(err => { | |
| const errorCode = err.code; | |
| let errorMessage = this.VerifyErroCode(errorCode); | |
| if (errorMessage == null) { | |
| errorMessage = err.message; | |
| } | |
| console.log(errorMessage); | |
| }) |
Thanks a lot to mredbishop and others for their insturctions posted here. This is just a recap of what they figured out.
This process was tested on WSL Ubuntu 18.04.
- Dowload the VcXsrv installer from https://sourceforge.net/projects/vcxsrv/
- Install the software on Windows
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
| MIT License | |
| Copyright (c) 2018 Noel Bundick | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
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
| /* global chrome, MediaRecorder, FileReader */ | |
| chrome.runtime.onConnect.addListener(port => { | |
| let recorder = null | |
| port.onMessage.addListener(msg => { | |
| console.log(msg); | |
| switch (msg.type) { | |
| case 'REC_STOP': | |
| console.log('Stopping recording') | |
| if (!port.recorderPlaying || !recorder) { |
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 React from "react"; | |
| import { render } from "react-dom"; | |
| import Task from "data.task"; | |
| import TaskComponent from "./TaskComponent"; | |
| const users = [ | |
| { id: 1, name: "User A", points: 45 }, | |
| { id: 2, name: "User B", points: 22 }, | |
| { id: 3, name: "User C", points: 79 }, | |
| { id: 4, name: "User D", points: 54 } |
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
| { | |
| "window.zoomLevel": -1, | |
| "editor.fontFamily": "Operator Mono, Menlo, Monaco, 'Courier New', monospace", | |
| "editor.fontSize": 29, | |
| "editor.lineHeight": 40, | |
| "editor.letterSpacing": 0.5, | |
| "workbench.editor.tabSizing": "shrink", | |
| "eslint.autoFixOnSave": true, | |
| "eslint.alwaysShowStatus": true, | |
| "html.format.enable": true, |
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
| <!DOCTYPE html> | |
| <html lang="en-US"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Speech transcription</title> | |
| <style> | |
| #transcriptionResults { | |
| width: 100%; | |
| height: 500px; | |
| } |