And English is a Work in Progress ⌛
Discover gists
Note
This no longer works in browser! If you absolutely need to use browser instead of desktop app, use an extension to add the string Electron/
anywhere in your user-agent.
How to use this script:
- Accept the quest under User Settings -> Gift Inventory
- Join a vc
- Stream any window (can be notepad or something)
- Press Ctrl+Shift+I to open DevTools
This file contains 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
"source ~/.vimrc | |
" Find more examples here: https://jb.gg/share-ideavimrc | |
let mapleader=" " | |
" Don't use Ex mode, use Q for formatting. | |
map Q gq | |
set number relativenumber | |
set scrolloff=5 |
This file contains 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/bash | |
# usage: | |
# curl -sL https://gist.github.com/grenade/8844d472bc1dcec48d37291b0b7b7220/raw/nvidia-driver-reinstall.sh?$(uuidgen) | bash | |
# uninstall all nvidia packages | |
sudo dnf erase '*nvidia*' | |
# disable the nvidia driver that doesn't come from rpm-fusion | |
# https://rpmfusion.org/Howto/CUDA#Which_driver_Package |
This file contains 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 aWaitForSuccess({ name, timeout, validator }) { | |
let def = promise.defer(); | |
function wait(validator) { | |
validator().then((success) => { | |
if(success) { | |
ok(true, "Validator function " + name + " returned true"); | |
def.resolve(); | |
} else { | |
setTimeout(() => wait(validator), timeout); |
This file contains 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"; | |
// Require some stuff | |
const { myMethod } = require("my-method"); | |
// Init code | |
myMethod("initializing"); | |
... | |
// Cleaning up |
This file contains 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 run = async (allowRefresh) => { | |
const response = await this.runRequest(methid, url, data); | |
if(this.requireRefresh(response) && allowRefresh) | |
return 'refresh'; | |
else if(response.error) | |
throw response; | |
else | |
return response; | |
}; |
This file contains 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 panel = new Panel({...}); | |
const runLoop = (text, i = 0) => { | |
// do something | |
self.port.once("updated-something", runLoop.bind(null, text, i + 1)); | |
self.port.emit("update-something", data); | |
}; | |
panel.port.on("text-changed", (text) => { | |
runLoop(text); |
NewerOlder