Skip to content

Instantly share code, notes, and snippets.

@benevidesh
benevidesh / zn
Last active March 12, 2024 16:10
Zettelkasten Workflow (WIP)
#!/usr/bin/bash
# zn - as zettell
# new export variables EDITOR for your editor and
#+ NOTES for your notes folder.
main () {
note_id=$(date +'%Y%m%d%H%M%S')
$EDITOR $NOTES/"$note_id".md
}
// by dave
float[][] result;
float t, c;
float ease(float p) {
p = c01(p);
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
@kokoscript
kokoscript / zsh-stats.py
Created October 25, 2021 09:36
Stats from .zsh_history
import time
import re
hist = []
commands = []
count = 0
trueCount = 0
# by year
yearCounts = {}
monthCounts = {}
@raysan5
raysan5 / open_source_and_videogames.md
Last active February 15, 2025 00:33
Open Source and Videogames - Resources

open_source_and_videogames

Open Source and Videogames - Resources

This git include a list of programs, tools, engines and libraries free and open source intended to make videogames.

NOTE: This gist is a support material for the talk "Open Source and Videogames" given by me, Ramon Santamaria, on October 26th 2021 in Canòdrom, Barcelona. All the materials listed here were explained in detail in a +2 hours talk.

Contents

@sago35
sago35 / tinygo_target.vim
Last active March 2, 2021 21:10
tinygo integration for vim
function! s:ChangeTinygoTargetTo(target)
let info = split(system('tinygo info -target ' . a:target), "\n")
for i in info
let data = split(i)
if len(data) > 2 && data[0] == "build" && data[1] == "tags:"
let s:goflags = "-tags=" . join(data[2:-1], ",")
elseif len(data) > 2 && data[0] == "cached" && data[1] == "GOROOT:"
let s:goroot = join(data[2:-1], ",")
endif
endfor
@luzhuomi
luzhuomi / pocketchip_debian10.md
Last active April 6, 2025 00:59
A tutorial to upgrade NXT pocket C.H.I.P to Debian Buster

Pocket Chip Debian 10 Upgrade Guide

The purpose of this tutorial is to walk through the required steps to upgrade NXT chip (or pocketchip) from debian jessie to debian buster.

If you would like to start your Chip from scratch, follow the steps in the Preparation section.

Preparation (Optional)

A linux host machine, recommended Ubuntu 18.04. However I managed to do it with 20.10 with some tweak.

# PCD8544 (Nokia 5110) LCD sample for Raspberry Pi Pico
# Required library:
# https://github.com/mcauser/micropython-pcd8544
# And this sample script is based on above repository.
# Connections:
# [pcd8544:pico(physical pin)]
# Gnd: Pico GND (38)
# BL : Pico GP28(34)
# Vcc: Pico 3V3 (36)
@MrAndrewMal
MrAndrewMal / journalctl.txt
Last active March 5, 2025 13:15
How to read live-tail logs of multiple services with journalctl
#Systemd - How to read live-tail logs of multiple services with journalctl
sudo journalctl --follow _SYSTEMD_UNIT=docker.service + _SYSTEMD_UNIT=apache2.service
@prologic
prologic / LearnGoIn5mins.md
Last active February 12, 2025 06:52
Learn Go in ~5mins
@standaloneSA
standaloneSA / nvidia.md
Last active February 5, 2025 10:12 — forked from meikuam/nvidia.md
Nvidia GPUs sorted by CUDA cores