Skip to content

Instantly share code, notes, and snippets.

@emanuele6
emanuele6 / linenum.ed
Last active March 2, 2025 20:59
POSIX ed script that prepends line numbers to the lines of a file.
1s/^/1 /
2,$g/^/-t -\
s/ .*//\
s/^9*$/0&/\
t .\
s/^.*[^9]\(9*\)$/\1 /\
s/9/0/g\
-s/9*$//\
s/8$/9/\
s/7$/8/\
@hunterirving
hunterirving / junk_remover.adb
Last active December 10, 2023 21:40
remove pre-installed android bloatware
cmd package uninstall -k --user 0 com.google.android.deskclock;
cmd package uninstall -k --user 0 com.google.android.calendar;
cmd package uninstall -k --user 0 com.google.android.calculator;
cmd package uninstall -k --user 0 com.android.chrome;
cmd package uninstall -k --user 0 com.google.android.apps.docs;
cmd package uninstall -k --user 0 com.google.android.apps.nbu.files;
cmd package uninstall -k --user 0 com.google.android.googlequicksearchbox;
cmd package uninstall -k --user 0 com.google.android.youtube;
cmd package uninstall -k --user 0 com.google.android.apps.youtube.music;
cmd package uninstall -k --user 0 com.google.android.apps.safetyhub;

DX7

image

Note: One of the algorithms is incorrect due to a missing operator. Need to update the image. Will have to get on that soon.

These are the original 32 algorithms as used in Yamaha DX7.

The later Yamaha FS1R and Yamaha SY77 may have compatibility with these algorithms, but that's beyond the current scope. The FS1R contains 88 algorithms, while the SY77 contains 45 algorithms.

@BusFactor1Inc
BusFactor1Inc / scheme-coin.lisp
Created December 16, 2017 07:28
A Common Lisp Blockchain - Scheme Coin
;;
;; scheme coin - a common lisp blockchain
;;
;; Burton Samograd
;; 2017
(load "~/quicklisp/setup.lisp")
(defconstant *coin-name* "Scheme Coin")
@hungneox
hungneox / cs.py
Created October 20, 2017 11:44
Python curses
#!/usr/bin/env python
import curses
import curses.textpad as textpad
try:
mainwindow = curses.initscr()
# Some curses-friendly terminal settings
curses.cbreak(); mainwindow.keypad(1); curses.noecho()
textpad.Textbox(mainwindow).edit()
@99z
99z / 9front_tutorials.md
Last active April 14, 2025 20:00
9front tutorials

9front tutorials

Current as of 9front-5966.df2c352ae695

This is a collection of notes on how to complete tasks I've found myself commonly performing while using 9front.

Note that most of what is here is straight from various parts of the 9front FQA, just ordered differently. If not from the FQA, I'll provide the source under the header for the section.

As I'm in the process of learning Plan 9/9front, feel free to comment with suggestions or corrections.

@99z
99z / 9front_install_guide.md
Last active February 11, 2025 13:27
9front install/usage tips

Virtualbox settings

VM creation

  1. Type: Other
  2. Version: Other/Unknown, not 64bit

VM settings

  1. Audio -> Audio controller: SoundBlaster 16
  2. Network -> Advanced -> Adapter type: Intel/PRO1000 MT Server
@claymcleod
claymcleod / pycurses.py
Last active April 28, 2025 17:11
Python curses example
import sys,os
import curses
def draw_menu(stdscr):
k = 0
cursor_x = 0
cursor_y = 0
# Clear and refresh the screen for a blank canvas
stdscr.clear()