(Play this in the back ground) https://www.youtube.com/watch?v=nVIYiBdfGwE
| function simulateKey (keyCode, type, modifiers, elm) { | |
| var evtName = (typeof(type) === "string") ? "key" + type : "keydown"; | |
| var modifier = (typeof(modifiers) === "object") ? modifier : {}; | |
| var event = document.createEvent("HTMLEvents"); | |
| event.initEvent(evtName, true, false); | |
| event.keyCode = keyCode; | |
| for (var i in modifiers) { | |
| event[i] = modifiers[i]; |
| #!/usr/bin/env python | |
| import os | |
| import sys | |
| import termios | |
| import tty | |
| import threading | |
| def main(): |
| #!/bin/sh | |
| export LC_ALL=C.UTF-8 | |
| export LANG=C.UTF-8 | |
| export LANGUAGE=C.UTF-8 | |
| # Terminal settings and colors | |
| export TERM=xterm-256color | |
| export BASE16_THEME=ocean |
| """ | |
| All environment variable access should be performed via this module. | |
| - allows tracing of where variables are used | |
| - provide sensible defaults | |
| - reduce string typos | |
| """ | |
| import os | |
| import sys | |
| SIZE = '10' |
| # Based on: | |
| # - https://unix.stackexchange.com/questions/82630/put-text-in-the-bash-command-line-buffer/82716#82716 | |
| # - https://github.com/junegunn/fzf/blob/master/shell/key-bindings.bash | |
| hack() { | |
| if [ $((RANDOM % 10)) -eq 0 ]; then | |
| # Run an interesting in the background: | |
| (/full/path/to/command &) | |
| fi | |
| local selected="e" |
| (function(){ | |
| function handleClick(e) { | |
| const r = Math.random(); | |
| if (r > 0.1) { | |
| console.log("not yet: ", r); | |
| return true; | |
| } | |
| e.preventDefault(); | |
| e.stopPropagation(); | |
| s = document.body.style; |
| (function(){ | |
| function handleClick(e) { | |
| e.preventDefault(); | |
| e.stopPropagation(); | |
| s = e.target.style; | |
| s.opacity = s.opacity === "" ? 0.5 : s.opacity * 0.5; | |
| console.log("I'm melting!"); | |
| return false; | |
| } | |
| document.querySelectorAll('a').forEach((a) => a.onclick = handleClick); |
| #!/bin/sh | |
| printf "\e[0mAll attributes off\e[0m\n" | |
| printf "\e[1mBold\e[0m\n" | |
| printf "\e[4mUnderline\e[0m\n" | |
| printf "\e[5mBlink\e[0m\n" | |
| printf "\e[8mHide\e[0m\n" | |
| printf "\e[30mBlack\e[0m\n" | |
| printf "\e[31mRed\e[0m\n" | |
| printf "\e[32mGreen\e[0m\n" | |
| printf "\e[33mYellow\e[0m\n" |
(Play this in the back ground) https://www.youtube.com/watch?v=nVIYiBdfGwE
| site_name: Docs | |
| theme: | |
| name: material | |
| docs_dir: doc | |
| markdown_extensions: | |
| - markdown.extensions.admonition | |
| - markdown.extensions.codehilite: | |
| guess_lang: false | |
| - markdown.extensions.def_list |