Skip to content

Instantly share code, notes, and snippets.

View LukasBombach's full-sized avatar
👨‍👩‍👧‍👦
Proud father

Lukas Bombach LukasBombach

👨‍👩‍👧‍👦
Proud father
View GitHub Profile
class CompileToStringPlugin {
constructor() {
this.PLUGIN_NAME = this.constructor.name;
}
apply(compiler) {
if (!this.options.isServer) {
compiler.hooks.normalModuleFactory.tap(this.PLUGIN_NAME, nmf => {
nmf.hooks.beforeResolve.tap(this.PLUGIN_NAME, result => {
# nvm with automatic node version switch based on the .nvmrc of a directory
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
autoload -U add-zsh-hook
load-nvmrc() {
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
# My oh my zsh aliases and functions
# Configure oh my zsh
alias zshrc="code ~/.zshrc"
alias pkg="code ./package.json"
alias dev="run dev"
alias build="run build"
alias start="run start"

setting up keyboard controls in recalbox via ssh

  1. plug in keyboard
  2. default controls are
    • arrow keys
    • "start" for menu
    • "a" for select
    • "s" for back
  3. set up network / wifi in the menu, you can see your ip there
  4. ssh root@YOUR_IP, the default password is recalboxroot
use tokio::{runtime::Builder, sync::{mpsc}};
use winit::{event::{Event, WindowEvent}, event_loop::{ControlFlow, EventLoop}, window::{Window, WindowBuilder}};
pub struct Gpu {
pub surface: wgpu::Surface,
pub device: wgpu::Device,
pub queue: wgpu::Queue,
pub sc_desc: wgpu::SwapChainDescriptor,
pub swap_chain: wgpu::SwapChain,
@LukasBombach
LukasBombach / es6.ebnf
Created September 8, 2021 18:27 — forked from avdg/es6.ebnf
ES6 bnf grammer - See https://avdg.github.io/es6.xhtml
/* ebnf file for es 6 - MAY CONTAIN ERRORS / DISAMBIGUITY */
Grammer::= Statement
/* Lexical grammer */
SourceCharacter ::= #x0000-#x10FFFF
InputElementDiv ::= WhiteSpace | LineTerminator | Comment | CommonToken | DivPunctuator | RightBracePunctuator
InputElementRegExp ::= WhiteSpace | LineTerminator | Comment | CommonToken | RightBracePunctuator | RegularExpressionLiteral
InputElementRegExpOrTemplateTail ::= WhiteSpace | LineTerminator | Comment | CommonToken | RegularExpressionLiteral | TemplateSubstitutionTail
InputElementTemplateTail ::= WhiteSpace | LineTerminator | Comment | CommonToken | DivPunctuator | TemplateSubstitutionTail
WhiteSpace ::= "<TAB>" | "<VT>" | "<FF>" | "<SP>" | "<NBSP>" | "<ZWNBSP>" | "<USP>"
  • Go to https://discussions.apple.com/welcome
  • If they forward you to https://communities.apple.com/de/welcome manually remove /de from the url so you'll go to https://communities.apple.com/welcome
  • yes that leaves you with https://communities.apple.com/welcome which is completely different from discussions.apple.com but they should now forward you to https://discussions.apple.com/welcome
  • Sign up with your already existing regular Apple ID
  • You'll need to create a seccond account for the discussion board, but it will be connected to your one and only Apple ID
  • Once you have a emglish discussions account, you will only have two discussions / commuity accounts, but only one Apple ID
  • On both sites you will only ever have to login with your Apple ID from now on
@LukasBombach
LukasBombach / Making Linaria work with Next js.md
Last active February 17, 2022 05:31
Making Linaria work with Next js

add linaria

yarn add -E linaria @zeit/next-css

.babelrc

{
@LukasBombach
LukasBombach / jest.config.json
Last active February 12, 2020 07:47
Debugging Jest with TypeScript in VSCode
{
"preset": "ts-jest",
"testEnvironment": "node"
}
Sorry StackOverflow sucks and this link is too long, here is the Playground:
https://www.typescriptlang.org/play/#code/JYOwLgpgTgZghgYwgAgKIFthklAPAQWQgA9IQATAZ2QG8BfZAXlroD5aAoZZAexAC5kACggA3COEEBrCAE8eMZPgA0yADbBKZaIPwBtMLIAOEBUXHgAugEom7OCFkBuLrxgxBIi2GlyzK9U1tKF0DY1NFMQkwGztkB2cOOg4OUBx4JCUjYE5uck0EHnEQ4S0SstAAc1tGdlEeYHIXbkpoUWAkTxAAV3QAI0Ee-ugauoampJSENThKagB5PoArCAQwAFkHOEroZGB0IzUIdGjqDCwcAmz2Glcjbr6NBHjKWRBnvlxUIlIJKmQZPJFPhrkJXNwopI0MpwYEtBIdFlgHpUJZXNZBAAFKA8TCtXD1Ro3WEAehJewORxO4DgYGAfF4mGwEHIyBgPCgyDAAAsUJQ4DI3FzuZofnBKRBXMk7g8ni83h93F8fmR-oD-KDYZCfNDYRp4SBESDkaj0VicXiIATxsTuNwyRTDsdorT6SBGRcWWyOcK+QKUGYeaKSOKnVLJhxprNqAB1WkIXl4dYqv5nJmXBKsW3IQogMrdNYckTpxHrWy3bjJBhTPhaIhMZCGgDuyDjYAT0CEzeQixWa02IG2nes1hcQA
From (https://stackoverflow.com/a/58993488/1183252)