Skip to content

Instantly share code, notes, and snippets.

@emanuele6
emanuele6 / linenum.ed
Last active June 7, 2024 09:04
POSIX ed script that adds line numbers in front of 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()
@claymcleod
claymcleod / pycurses.py
Last active September 10, 2024 17:26
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()