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 => {
# 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"
# 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}")")

Partial Hydration

If you do server side rendering (SSR) you don't necessarily need to hydrate your entire page if most of your content ist static and only some parts are interactive / dynamic. That is especially true for a newspaper website, which ich what we are working on.

What you want is partial hydration, sometimes called or related to progressive hydration or lazy hydration.

There are a few implementations out there to achive this, for instance second-dehydrator

@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

{

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>"
<system>
<fullname>CPS1</fullname>
<name>cps1</name>
<path>~/RetroPie/roms/cps1</path>
<extension>.zip .ZIP .fba .FBA</extension>
<command>/opt/retropie/supplementary/runcommand/runcommand.sh 1 "/opt/retropie/emulators/pifba/fba2x %ROM%" </command>
<!-- alternatively: <command>/opt/retropie/supplementary/runcommand/runcommand.sh 1 "/opt/retropie/emulators/RetroArch/installdir/bin/retroarch -L /opt/retropie/emulatorcores/fba-libretro/svn-current/trunk/fb_alpha_libretro.so --config /opt/retropie/configs/all/retroarch.cfg --appendconfig /opt/retropie/configs/fba/retroarch.cfg %ROM%"</command> -->
<platform>arcade</platform>
<theme></theme>
</system>
  • 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