Skip to content

Instantly share code, notes, and snippets.

@chidiwilliams
chidiwilliams / export-buzz-cache.ipynb
Last active June 26, 2023 08:17
export-buzz-cache.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chidiwilliams
chidiwilliams / styles.css
Created December 23, 2022 08:24
Hide Twitter view counts on Timeline and tweet pages
div:has(> a[href*="analytics"][aria-label*="Views"]),
div:has(> a[href*="analytics"][aria-label*="analytics"]),
div:has(> a[href*="analytics"][dir*="ltr"]) {
display: none;
}
@chidiwilliams
chidiwilliams / binary-diagnostic.js
Created December 3, 2021 12:09
binary-diagnostic
function getProductOfOxyAndCo2(list) {
const len = list[0].length;
let oxy = [...list];
let co2 = [...list];
while (true) {
let oxyDone = false;
let co2Done = false;
@chidiwilliams
chidiwilliams / main.go
Last active October 11, 2021 07:17
Print process tree
package main
import (
"fmt"
"strings"
)
type Node struct {
Name string
Children []Node
@chidiwilliams
chidiwilliams / how-i-use-roam-research.md
Created November 25, 2020 23:47
How I use [[Roam Research]]
  • Daily Notes
    • Quick journals of what I'm doing, reading, watching, listening to, thinking about
    • Yet-to-be-organized content
    • Todos with links, images, references
  • Book Notes and Highlights
    • Read on [[Kindle]] device - Import into [[Readwise]] and Readwise creates a Roam page for each book containing the notes and highlights
      • Kindle books: Auto-sync
@chidiwilliams
chidiwilliams / main.go
Last active August 3, 2020 13:08
My Solution to Find Treasure App (Ileya Game)
package main
import (
"encoding/json"
"fmt"
"log"
"math"
"net/http"
"os"
"time"
@chidiwilliams
chidiwilliams / humantimediff.py
Created January 10, 2017 20:53
Custom Django Filter to present time difference in human friendly form e.g. just now, 4 minutes ago, a month ago.
from django import template
register = template.Library()
@register.filter
def humanTimeDiff(value):
"""
Returns the difference between the datetime value given and now()
in human-readable form
"""