Skip to content

Instantly share code, notes, and snippets.

View langf00rd's full-sized avatar
🔥
Building stuff

langford // 🇬🇭 langf00rd

🔥
Building stuff
View GitHub Profile
@langf00rd
langf00rd / charcoal.json
Last active March 20, 2025 12:18
black and white zed theme
{
"$schema": "https://zed.dev/schema/themes/v0.2.0.json",
"name": "charcoal",
"author": "Unknown",
"themes": [
{
"name": "charcoal",
"appearance": "dark",
"style": {
"editor.background": "#141414",
{
"$schema": "https://zed.dev/schema/themes/v0.1.0.json",
"name": "Z Carbon",
"author": "langf00rd",
"themes": [
{
"name": "Z Carbon Dark",
"appearance": "dark",
"style": {
"editor.background": "#000",
@langf00rd
langf00rd / zed-config.json
Last active March 20, 2025 12:13
my zed config
{
"chat_panel": {
"dock": "left"
},
"buffer_font_family": "Maple Mono ExtraLight",
"outline_panel": {
"dock": "left"
},
"features": {
"edit_prediction_provider": "zed"
@langf00rd
langf00rd / code.jsx
Created October 18, 2023 11:33 — forked from pomber/code.jsx
Highlight selected text in code
function Code() {
const ref = React.useRef()
React.useEffect(() => {
const handler = e => {
const selected = document.getSelection().toString().trim()
ref.current.querySelectorAll("span:not(:has(*))").forEach(element => {
if (element.textContent === selected) {
element.classList.add("selected")
} else {
element.classList.remove("selected")
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
// SPDX-License-Identifier: MIT
// File: @openzeppelin/contracts/utils/cryptography/MerkleProof.sol
// ____ ____ _____ ____ ___ _____ ____ _ _ _ ____ _ ____ _ _____ ____ ____ _______ __ _____ _____ _ __ __
// / ___| _ \| ____| _ \_ _|_ _/ ___|_ / \ | | | | _ \ / \ / ___| | | ____/ ___| | _ \| ____\ \ / / |_ _| ____| / \ | \/ |
// | | | |_) | _| | | | | | | | \___ (_) / _ \| | | | |_) | / _ \| | | | | _| \___ \ | | | | _| \ \ / / | | | _| / _ \ | |\/| |
// | |___| _ <| |___| |_| | | | | ___) | / ___ \ |_| | _ < / ___ \ |___| |___| |___ ___) | | |_| | |___ \ V / | | | |___ / ___ \| | | |
// \____|_| \_\_____|____/___| |_| |____(_) /_/ \_\___/|_| \_\/_/ \_\____|_____|_____|____/ |____/|_____| \_/ |_| |_____/_/ \_\_| |_|
// Spaceboy & Helios
import os.path
import json
from tkinter import Tcl
current_path = os.path.abspath(os.getcwd() + "/metadata")
files = os.listdir(current_path)
sorted_files = Tcl().call("lsort", "-dict", files)
index = 0
name = "Meta Mini"