Skip to content

Instantly share code, notes, and snippets.

View schalkneethling's full-sized avatar
🇺🇦
The world wants peace, not war ✌️

Schalk Neethling schalkneethling

🇺🇦
The world wants peace, not war ✌️
View GitHub Profile
@schalkneethling
schalkneethling / theme.json
Created October 6, 2023 19:15
VSCode Theme
{
"$schema": "vscode://schemas/color-theme",
"type": "dark",
"colors": {
"actionBar.toggledBackground": "#383a49",
"activityBar.activeBorder": "#0078d4",
"activityBar.background": "#181818",
"activityBar.border": "#2b2b2b",
"activityBar.foreground": "#d7d7d7",
"activityBar.inactiveForeground": "#868686",
@schalkneethling
schalkneethling / question.md
Created January 21, 2023 21:24
Understanding the impact on memory and speed of different tokenizers - Flexsearch

I asked ChatGPT the following questions:

  • Memory Factor (n = length of word) what is the memory impact of * 1. The value of n is firefox
  • Memory Factor (n = length of word) what is the memory impact of * n. The value of n is firefox
  • Memory Factor (n = length of word) what is the memory impact of * 2n - 1. The value of n is firefox
  • Memory Factor (n = length of word) what is the memory impact of * n * (n - 1). The value of n is firefox

It responded with the following:

  • The memory impact of 1 when the value of n is “firefox” would be minimal, it would be the minimal amount of memory required to store a single character.
@schalkneethling
schalkneethling / users-correct.html
Last active November 25, 2022 20:55
Github user table
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>GitHub Users</title>
<style>
table {
width: 100%;
@schalkneethling
schalkneethling / figma-file-data.json
Created October 22, 2022 11:08
Figma export debug data
This file has been truncated, but you can view the full file.
{
"name": "open-peeps",
"id": {
"ac": "1c914260-f3e9-801d-8001-7b1b6954bb1d",
"__hash": null,
"C": 2153775104,
"J": 2048
},
"changes": [
{
@schalkneethling
schalkneethling / README.md
Last active September 2, 2022 09:38
100% Markdown Project Documentation

100% Markdown

Why get to 100% Markdown?

There are several reasons why we want to get all active content on MDN Web Docs to 100% Markdown. The top three reasons are,

  • Markdown is a much more approachable and friendlier way to contribute to MDN Web Docs content. Having all content in Markdown also creates a unified experience across languages and repositories.
  • All the content in Markdown will allow engineering to clean up a lot of currently maintained code to facilitate the ease of conversion from HTML to Markdown. Having less code to maintain will enable them to focus on improving the tooling for writers and contributors. Better tooling leads to a more enjoyable contribution workflow.
  • All content in Markdown allows us to run the same linting rules across all active languages.
  • On main I first did: git pull origin main
  • Added your fork as a remote: git remote add dipika https://github.com/dipikabh/content.git
  • Fetched the branch: git fetch dipika move-contrib-docs:move-contrib-docs
  • Switched to the branch: git switch move-contrib-docs
  • Merged main onto your branch: git merge main
  • Removed all the files that was causing conflicts:
rm files/en-us/mdn/guidelines/code_guidelines/css/index.md files/en-us/mdn/guidelines/code_guidelines/general/index.md
files/en-us/mdn/guidelines/code_guidelines/javascript/index.md files/en-us/mdn/guidelines/code_guidelines/shell/index.md
files/en-us/mdn/guidelines/writing_style_guide/index.md files/en-us/related/criteria_for_inclusion/index.md files/en-us/related/project_guidelines/index.md
@schalkneethling
schalkneethling / clock.js
Created July 8, 2022 15:23
A simple JavaScript countdown timer
(function () {
dayjs.extend(window.dayjs_plugin_duration);
const launchDay = Date.parse("2022-06-10T21:00:00Z");
const daysOutput = document.getElementById("countdown-days");
const hoursOutput = document.getElementById("countdown-hours");
const minutesOutput = document.getElementById("countdown-minutes");
const secondsOutput = document.getElementById("countdown-seconds");
$mq-tablet-and-up: screen and
(
min-width: 47.9375em,
);
$mq-small-desktop-and-up: screen and
(
min-width: 63.9375em,
);
$mq-large-desktop-and-up: screen and
(
@schalkneethling
schalkneethling / bash
Last active February 4, 2022 11:09
Random snippets
# count all `index.html` and `index.md` files in the current directory recursively.
find . -iname 'index.html' -o -iname 'index.md' | wc -l
// https://nationalkitty.com/cat-ancestry-where-do-cats-come-from/
const pantherinae = {
roar: function () {
console.log(`${this.name} is roaring!`);
},
domesticated: false,
size: "large",
sound: "roar",
};