sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
| taskkill /F /IM wslhost.exe | |
| taskkill /F /IM wsl.exe | |
| taskkill /F /IM wslservice.exe | |
| net stop LxssManager | |
| net start LxssManager |
| OCTANE_SERVER=swoole | |
| OCTANE_HTTPS=true |
| #!/bin/bash | |
| em++ --bind cpp-code.cpp --post-js js-code.js -o output.js | |
| node output.js |
| <?php | |
| function startsWith ($string, $startString) | |
| { | |
| $len = strlen($startString); | |
| return (substr($string, 0, $len) === $startString); | |
| } | |
| $url="https://www.youtube.com/"; |
| #!/bin/bash | |
| yum -y install gcc make glib2-devel libcurl-devel openssl-devel gmp-devel tar automake autoconf libtool wget asciidoc | |
| wget https://megatools.megous.com/builds/megatools-1.10.0-rc1.tar.gz | |
| tar -xzvf megatools*.tar.gz | |
| cd megatools* | |
| ./configure | |
| make | |
| make install | |
| # megadl 'https://mega.nz/#xxxxxxxxxxx!' |
| /* | |
| Copy this into the console of any web page that is interactive and doesn't | |
| do hard reloads. You will hear your DOM changes as different pitches of | |
| audio. | |
| I have found this interesting for debugging, but also fun to hear web pages | |
| render like UIs do in movies. | |
| */ | |
| const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
Hopefully you'll Live Long and Prosper, so I don't mean terminal as in "you gonna die". This is a somewhat opinionated article on configuring a macOS machine with:
| // ==UserScript== | |
| // @name AdSkipper | |
| // @namespace https://gist.github.com/paulera/671daf5b9a5f6502697359941ba524dc | |
| // @version 1.3 | |
| // @description Skip youtube ads automatically | |
| // @author paulera | |
| // @match https://www.youtube.com/* | |
| // @grant none | |
| // ==/UserScript== |
| import java.util.Optional; | |
| import java.util.function.Function; | |
| public class Option { | |
| public static <T, V> Optional<V> ofThrowable(T it, Function<T, V> func) { | |
| try { | |
| return Optional.ofNullable(func.apply(it)); | |
| } catch (Exception e) { | |
| return Optional.empty(); | |
| } |