Skip to content

Instantly share code, notes, and snippets.

View Frankie-B's full-sized avatar
💭
New Day New Code

Frankie Bukenya Frankie-B

💭
New Day New Code
  • The Netherlands
View GitHub Profile

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@Frankie-B
Frankie-B / update_canary.sh
Created February 20, 2024 09:21 — forked from silvadev/update_canary.sh
chrome canary for linux
#!/bin/bash
#
# Update to latest chromium nightly on linux
# Script requires root to properly set up the sandbox
# https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment
#
# I use it with a line like the following in my .bashrc:
# alias canary='CHROME_DEVEL_SANDBOX="/home/tif/bin/chrome-linux/chrome_sandbox" /home/tif/bin/chrome-linux/chrome-wrapper'
#
# ----------------------------------------------------------------------
@Frankie-B
Frankie-B / Cloning Function with Default Implementation.md
Created February 10, 2024 16:11
This code snippet defines a cloning function that takes an element as input and returns a clone of its first child element. If a cloning function is not provided, it uses a default implementation.

Cloning Function with Default Implementation

Preview:
// Define a cloning function if not provided.
                const cloneFn = clone || (el => {
                    let clone = el.children[0].cloneNode(true);
                    el.insertBefore(clone, el.children[0]);
                    return clone;
                });
@Frankie-B
Frankie-B / hyperjs.md
Created August 26, 2023 15:44 — forked from raftheunis87/hyperjs.md
Hyper.js + Hyper.js Plugins + ZSH + Starship + Fira Code + Dark Theme - (macOS)

Hyper.js

@Frankie-B
Frankie-B / starship.toml
Created June 4, 2023 16:06 — forked from ryo-ARAKI/starship.toml
Starship configuration file
# ~/.config/starship.toml
[battery]
full_symbol = "🔋"
charging_symbol = "🔌"
discharging_symbol = "⚡"
[[battery.display]]
threshold = 30
style = "bold red"
@Frankie-B
Frankie-B / .aliases
Created June 4, 2023 14:47 — forked from trulyronak/.aliases
Awesome Terminal Aliases (Featuring Brilliant Bash)
# fun stuff
alias lenny='echo \_(ツ)_/¯ | pbcopy'
alias tuxsay='cowsay -f tux '
alias fortunes='sh ~/.fortunes.sh'
alias life='figlet 42 | lolcat'
alias lol='while true; do sl; done;'
alias starwars='telnet towel.blinkenlights.nl'
alias fancy='figlet $@'
# to make people confused xD
@Frankie-B
Frankie-B / starship.toml
Created June 4, 2023 14:19 — forked from pythoninthegrass/starship.toml
Starship prompt setup
# SOURCE: https://starship.rs/config
# DEBUG via: `starship explain`
# Timeout for commands executed by starship (ms)
command_timeout = 500
# Replace the "❯"
[character]
success_symbol = "[λ](green)"
@Frankie-B
Frankie-B / eslint_prettier_airbnb.md
Created May 18, 2023 16:20 — forked from bradtraversy/eslint_prettier_airbnb.md
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@Frankie-B
Frankie-B / semantics.html
Created March 23, 2023 23:10 — forked from jaredcwhite/semantics.html
Example of how I write HTML markup in 2021
<timeline-post post-id="54235" source-id="13" >
<sl-card style="margin-bottom: var(--sl-spacing-large)">
<a href="https://appleinsider.com/articles/21/05/11/jamf-acquires-zero-trust-cloud-security-startup-wandera-in-400m-deal?utm_medium=rss" target="_blank" slot="image"><img
src="https://photos5.appleinsider.com/gallery/41951-81380-34258-61556-jamf-pro-head-xl-xl.jpg"
alt="article thumbnail"
class="post-thumbnail"
/></a>
<h3><a target="_blank" class="link" href="https://appleinsider.com/articles/21/05/11/jamf-acquires-zero-trust-cloud-security-startup-wandera-in-400m-deal?utm_medium=rss">Jamf acquires 'zero trust' cloud security startup Wandera in $400M deal</a></h3>
@Frankie-B
Frankie-B / turbo_transitions.js
Created March 23, 2023 23:01 — forked from jaredcwhite/turbo_transitions.js
Nice transitions using Turbo
document.addEventListener("turbo:visit", () => {
let main = document.querySelector("main");
if (main.dataset.turboTransition == "false") return;
let [movement, scale] = ["-12px", "0.99"];
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
[movement, scale] = ["-6px", "1"]
};