Skip to content

Instantly share code, notes, and snippets.

@wd5gnr
wd5gnr / pic_16f886-2.log
Last active August 29, 2015 14:00
Pastebin for MINIPro
BULK_OUT(0.1):03639100010000000028000000400000c00fe00f40000000000000000000000000000000000000000000000000000000 # 0.0000000000000000
BULK_OUT(0.1):fe63910001 # 0.0020170211791992
BULK_IN(0.1): 0000bfbfbfbfbfbfbf00bfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbf # 0.1331801414489746
BULK_OUT(0.1):0563910001000000 # 0.0018589496612549
BULK_IN(0.1): 040262203e0202 # 0.0306379795074463
BULK_OUT(0.1):fe63910001 # 0.0083658695220947
BULK_IN(0.1): 0000bfbfbfbfbfbfbf00bfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbf # 0.0021290779113770
BULK_OUT(0.1):04639100 # 0.0017690658569336
BULK_OUT(0.1):03639100010000000028000000400000c00fe00f40000000000000000000000000000000000000000000000000000000 # 0.1330490112304688
BULK_OUT(0.1):fe63910001 # 0.0020220279693604
@wd5gnr
wd5gnr / hidetab.css
Created July 28, 2020 15:44
Vivaldi Configurations
/*Vertical tab bar auto-hide*/
#tabs-container{
width: 5px !important;
}
#tabs-container:hover{
width: 220px !important;
}
/*Tab bar is an overlay instead of resizing the page*/
#main .inner {
position: relative;
@wd5gnr
wd5gnr / cdfunc.sh
Last active May 3, 2024 11:21
cdfunc.sh
# This function defines a 'cd' replacement function capable of keeping,
# displaying and accessing history of visited directories, up to 10 entries.
# To use it, uncomment it, source this file and try 'cd --'.
# acd_func 1.0.5, 10-nov-2004
# Petar Marinov, http:/geocities.com/h2428, this is public domain
xcd_func ()
{
local x2 the_new_dir adir index
@wd5gnr
wd5gnr / baloo-nice
Created November 28, 2020 04:22
A script to move baloo to a cgroup where you can limit its disk usage!
#!/bin/bash
#baloo-nice by Al Williams
RLIMIT=1048576 # bps limit (read)
WLIMIT=1048576 # bps limit (write)
DEVICES="8 252 253 259"
SEARCH=baloo
if [ ! -d /sys/fs/cgroup/blkio/baloo ]
then
@wd5gnr
wd5gnr / atodsim.txt
Last active June 11, 2021 17:19
Falstad Simulator with Arduino A2D Example
#if 0 // simulation documentation
WARNING WARNING WARNING WARNING
Using any of the simulator's Save/Export functions will _NOT_
save this soure code! Before exiting the simulator, you must
save this text file somewhere.
Note that the schematic is encoded in text below. If you change the
schematic, you'll need to update the import text below to "save" it
with this file. However, the code doesn't care about that at all. Use
@wd5gnr
wd5gnr / main.c
Created April 25, 2021 19:43
Simple SQLite example
#include <sqlite3.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
sqlite3 *db;
sqlite3_stmt *sql;
int rv;
rv=sqlite3_open("parts.db",&db);
@wd5gnr
wd5gnr / baloo-nice
Created June 1, 2022 14:43
A script to move baloo to a cgroup to limit both memory and disk I/O
#!/bin/bash
#baloo-nice by Al Williams
if [ "$1" == "fast" ]
then
RLIMIT=100048576 # bps limit (read)
WLIMIT=100048576 # bps limit (write)
else
RLIMIT=548576 # bps limit (read)
WLIMIT=548576 # bps limit (write)
@wd5gnr
wd5gnr / hilo.sh
Last active March 29, 2023 20:02
A simple hilo game using Gum (https://github.com/charmbracelet/gum)
#!/bin/bash
clear
# init colors
FG="#00ffff"
BFG="#00ff00"
# if you wonder why true is in there https://www.shellcheck.net/wiki/SC2015
gum confirm --default --affirmative="Play now" --negative="Dump source first" --timeout=10s "Would you like to view the source code before playing?" && true || ( gum format -t code <"$0" )
# get initial info
gum style --foreground "$FG" --border-foreground "$BFG" --border double --align center --width 64 --margin "1 2" --padding "2 4" \
@wd5gnr
wd5gnr / Program.cpp
Created May 5, 2023 21:29
1802 Literate Assembler Examples
// Simple 1802 Literate Program
#include "lit1802.h"
#define ON 1
#define OFF 0
#define DELAYPC 9 // delay subroutine
#define DELAYR 8 // delay count register
#define MAINPC 3 // Main routine PC
@wd5gnr
wd5gnr / rpn.c
Last active June 19, 2023 20:47
RPN in Python or C
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
float stack[32];
unsigned sp=0;