Skip to content

Instantly share code, notes, and snippets.

View dlford's full-sized avatar

Dan Ford dlford

View GitHub Profile
@dlford
dlford / cacheremove.hook
Created February 1, 2022 14:30 — forked from luukvbaal/cacheremove.hook
yay paccache hooks
[Trigger]
Operation = Remove
Type = Package
Target = *
[Action]
Description = Clearing cache...
When = PostTransaction
Exec = /home/<user>/.local/bin/tools/removehook
@dlford
dlford / README.md
Created March 8, 2022 21:50
Git Remove Submodule

Remove a submodule from git

git rm .gitmodules # Or edit, if there are some submodules to be kept

edit .git/config, remove the submodule lines, e.g.
  [submodule "cms-core-ops"]
  101   url = [email protected]:dlford/cms-core-ops.git
  102   active = true
 

Keybase proof

I hereby claim:

  • I am dlford on github.
  • I am dlford (https://keybase.io/dlford) on keybase.
  • I have a public key ASCxAM5NhwduKrHNRtpIEr5RT-CDWo-LbzvFpzI4l8ox-wo

To claim this, I am signing this object:

@dlford
dlford / main.go
Created August 23, 2023 23:27
Example Go Code
package main
import (
"encoding/json"
"fmt"
)
// Comment from Database
type Comment struct {
ID string `json:"id""`
@dlford
dlford / main.js
Created August 23, 2023 23:28
Example JS Code
const datajson = `[{"id":"f1c3a838-f4b4-4ebd-bb1b-d3e4c0dce27d","pid":"6a162b3f-9341-46e9-95f7-dedc6cd06868","text":"comment 1"},{"id":"131cf4bb-1971-43a2-992f-2cbb042a4184","pid":"","text":"comment 2"},{"id":"4c93a789-ecab-4173-954c-b039cd3a9e17","pid":"131cf4bb-1971-43a2-992f-2cbb042a4184","text":"comment 3"},{"id":"c7974b6d-67e1-47d0-84fa-c78d51682df2","pid":"131cf4bb-1971-43a2-992f-2cbb042a4184","text":"comment 4"},{"id":"386c4439-4596-47c1-99bf-cb479055fe5a","pid":"","text":"comment 5"},{"id":"5ef0816e-ea13-4a7e-8009-e67ee08ef906","pid":"386c4439-4596-47c1-99bf-cb479055fe5a","text":"comment 6"},{"id":"96b0a536-602b-4f3f-a352-020f22cdfb18","pid":"","text":"comment 7"},{"id":"d0f11e98-deea-4fd5-becb-8f406ebcae83","pid":"96b0a536-602b-4f3f-a352-020f22cdfb18","text":"comment 8"},{"id":"bad87461-3cbf-4ecb-a8c7-36876b57d652","pid":"","text":"comment 9"},{"id":"e3ee6f90-495f-4348-9c29-bd6e15ec3b39","pid":"bad87461-3cbf-4ecb-a8c7-36876b57d652","text":"comment 10"},{"id":"6a162b3f-9341-46e9-95f7-dedc6cd06868","pi
@dlford
dlford / out.txt
Created August 23, 2023 23:30
Go example output
[
{
"id": "fe78ce24-c2c8-4d00-b96d-8b8be9ce0f06",
"pid": "",
"text": "comment 30"
},
{
"id": "bad87461-3cbf-4ecb-a8c7-36876b57d652",
"pid": "",
"text": "comment 9",
@dlford
dlford / out.txt
Created August 23, 2023 23:30
JS example output
[
{
"id": "131cf4bb-1971-43a2-992f-2cbb042a4184",
"pid": "",
"text": "comment 2",
"children": [
{
"id": "4c93a789-ecab-4173-954c-b039cd3a9e17",
"pid": "131cf4bb-1971-43a2-992f-2cbb042a4184",
"text": "comment 3"
@dlford
dlford / main.go
Created August 24, 2023 01:13
Fixed Go code
package main
import (
"encoding/json"
"fmt"
)
// Comment from Database
type Comment struct {
ID string `json:"id"`
@dlford
dlford / example.html
Last active September 6, 2023 16:41
Chromium Bug 1479494 Demo Code
<html>
<head>
<style>
:where(.modal) {
margin: 0;
padding: 0;
inline-size: 100%;
max-inline-size: 100%;
block-size: 100%;
max-block-size: 100%;