Skip to content

Instantly share code, notes, and snippets.

View schell's full-sized avatar
🥑
mmm

Schell Carl Scivally schell

🥑
mmm
View GitHub Profile
@schell
schell / electronic_basics.md
Last active May 17, 2020 16:58
electronics basics
  • Understand the concepts of voltage, resistance and current
  • Use Ohm's Law to calculate voltage, current and resistance
  • Use Kirchhoff's Laws to calculate voltage and current
  • Understand the meaning of and calculate energy and power
  • Use resistors in various configurations, like in voltage dividers and voltage ladders
  • Read the value of a resistor from its package
  • Use pull-up and pull-down resistors
  • Understand the use of capacitors
  • Use capacitors as energy stores and filters
  • Calculate the RC time constant of a capacitor
@schell
schell / mogwai_ssr.md
Last active July 26, 2020 00:06
mogwai server side rendering notes

mogwai uses web-sys and wasm_bindgen to accomplish DOM creation and dynamic updates. Mogwai's main type Gizmo<T> has a type variable T meant to be filled by web-sys types that represent DOM nodes. Since web-sys's operations rely on javascript->wasm interop, any server side (ie rust only) pre-rendering should not happen through the normal browser-bound mogwai codepath. Of course using web-sys in this way would compile fine - but attempting to build the DOM and run a mogwai Gizmo when compiled to native code would cause a panic. Not all is lost though, as this actually points us in the direction of a sane implementation so long as we don't get carried away.

mogwai is meant to be a lightning fast frontent library, not a feature-rich web development framework. There are already plenty of heavy frameworks (I'm looking at Yew, kid). To this end I don't want to push mogwai into becoming an "isomorphic" framework (ie one that can run the same code on both server and browser). Instead I would

@schell
schell / .spacemacs
Last active October 27, 2022 23:41
Spacemacs config
;; -*- mode: emacs-lisp; lexical-binding: t -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Layer configuration:
This function should only modify configuration layer settings."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
@schell
schell / birds-of-ruin-theme.el
Created May 22, 2021 16:45
Birds of Ruin - Emacs theme
(deftheme birds-of-ruin
"Created 2021-03-16.")
(custom-theme-set-faces
'birds-of-ruin
'(cursor ((t (:foreground "#865C38" :background "#E6E1C4"))))
'(fixed-pitch ((t (:family "Monospace"))))
'(variable-pitch ((((type w32)) (:foundry "outline" :family "Arial")) (t (:family "Sans Serif"))))
'(escape-glyph ((t (:foreground "#BE73FD"))))
'(homoglyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown"))))