Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font
To setup native Linux, see this gist
Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font
To setup native Linux, see this gist
package main | |
import ( | |
"log" | |
"os/exec" | |
) | |
func main() { | |
path, err := exec.LookPath("ls") | |
if err != nil { |
welcome messages: "https://gist.github.com/fourjr/0f47ce8a000c29cd4e24f8aeb7edd8e0" | |
Somewhere in 2020, they changed their loading lines to be more (professional?). | |
Ctrl+Shift+I > Application > Frames > top > Scripts > a3762dfb973e0a7a21ba.js > ctrl+f "LOADING_LINE" or https://canary.discordapp.com/assets/a3762dfb973e0a7a21ba.js | |
LOADING_LINE_1: "Discord was almost called Bonfire before we picked our name. It was meant to be nice and cozy.", | |
LOADING_LINE_2: "Discord was almost called Wyvern before we picked our name. Not too proud of that one.", | |
LOADING_LINE_3: "Our logo's name is Clyde.", | |
LOADING_LINE_4: 'There are a bunch of hidden "Easter Eggs" in the app that happen when you click certain things...', LOADING_LINE_5: "Discord started as a game company making a mobile game called Fates Forever.", | |
LOADING_LINE_6: "Discord’s official birthday is May 13, 2015.", |
function unirest_prom(unirest_req, always_resolve) { | |
// Returns a Promise by wrapping a unirest.Request object in | |
// a Promise that immediately calls `.end(...)` | |
// | |
// Params: | |
// | |
// * unirest_req - unirest.Request - any unirest Request object that has | |
// not yet had `.end(...)` called on it | |
// * always_resolve - bool (optional) - defaults to `false`, iff `true` then | |
// the Promise always resolves--even when the request fails |
I play games regularly, and the sad reality is that it forces me to use Windows on my desktop. There's a Linux installation on there, but rebooting into it is such a massive interruption that I usually just move over to my laptop for programming. Working on a laptop leads to all sorts of ergonomic issues, and it felt like a massive waste to not develop on the desktop hardware I invested so much in. So after extensively researching what the VFIO community has been doing, I've deleted my Windows installation and moved all my gaming into a virtual machine on a Linux host.
Normally VMs are too slow for gaming, but thanks to a feature called VFIO you can run games at near-native performance by passing graphics cards and USB controllers directly to a virtual machine. The only requirement is that your board supports IOMMU, which most modern systems have. In this guide I'll wal
/*<?php | |
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s", | |
//\u000A\u002F\u002A | |
class PhpJava { | |
static function main() { | |
echo(//\u000A\u002A\u002F | |
"Hello World!"); | |
}} | |
//\u000A\u002F\u002A | |
PhpJava::main(); |
@Configuration | |
public class MultiConnectionSupport { | |
@Value("${server.port}") | |
private int serverPort; | |
@Value("${server.http.port}") | |
private int httpServerPort; | |
@Bean | |
public EmbeddedServletContainerFactory servletContainer() { |
var http = require('http'), | |
https = require('https'), | |
httpProxy = require('http-proxy'); | |
var caCert = | |
'-----BEGIN CERTIFICATE-----\n' + | |
'MIIDajCCAlICCQDgeRZY85PN7TANBgkqhkiG9w0BAQUFADB2MQswCQYDVQQGEwJV\n' + | |
'UzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEh\n' + | |
'MB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMRcwFQYDVQQDEw5EZW1v\n' + | |
'IEF1dGhvcml0eTAgFw0xNTA3MDQyMTQxNDlaGA8yMTE1MDYxMDIxNDE0OVowdjEL\n' + |
// Long Polling (Recommened Technique - Creates An Open Connection To Server ∴ Fast) | |
(function poll(){ | |
$.ajax({ url: "server", success: function(data){ | |
//Update your dashboard gauge | |
salesGauge.setValue(data.value); | |
}, dataType: "json", complete: poll, timeout: 30000 }); | |
})(); |