Skip to content

Instantly share code, notes, and snippets.

View zvakanaka's full-sized avatar

Adam Quinton zvakanaka

View GitHub Profile
Action Shortcut
about
arrange-items-menu
back Alt+Left
back-alt BackSpace
bookmarks-menu
cancel-search Escape
clear-directory-specific-settings
close-all-windows Ctrl+Shift+w

Fedora Sericea Setup

First things first, the default font is not intended for the swaybar config that comes with Sericea.

Install a Custom Font

Download a font (e.g. JetBrains Mono) from NerdFonts and extract to .local/share/fonts.

Terminal Config

The default terminal is foot, which can be customized by adding $HOME/.config/foot/foot.ini.

Sample foot config:

#!/bin/bash
# this is an updated fork
# <xbar.title>Octoprint</xbar.title>
# <xbar.author>m0a</xbar.author>
# <xbar.author.github>m0a</xbar.author.github>
# <xbar.version>v1.1</xbar.version>
# <xbar.desc>3dprinter control with octoprint api</xbar.desc>
# <xbar.image>http://i.imgur.com/biN2ISe.png</xbar.image>
# <xbar.dependencies></xbar.dependencies>
@zvakanaka
zvakanaka / scan.sh
Created August 21, 2023 03:34
Scan auto script with comments... delete this after updating repo
#!/bin/bash
INITIAL_COUNTER=0
function init_counter() {
for file in *; do
if [ -f "$file" ]; then
pattern='([[:digit:]]+)'
[[ "$file" =~ $pattern ]]
if [ $((BASH_REMATCH[0])) -gt $((INITIAL_COUNTER)) ]; then
Button Hex
Power BD807F
Up-Cup BD0AF5
Down-Cup BD8A75
Previous BD1AE5
Next BDEA15
Play/pause BDFA05
Source BD20DF
Up BDD02F
#include <Arduino.h>
// same version as dronebot 433 video
#include <RH_ASK.h>
#include <SPI.h>
RH_ASK rf_driver;
void setup() {
rf_driver.init();
Serial.begin(9600);
@zvakanaka
zvakanaka / 433-json-receiver.ino
Created November 13, 2021 05:21
Deserialize JSON using a cheap 433 Mhz reciever
#include <Arduino.h>
// version 6
#include <ArduinoJson.h>
// same version as dronebot 433 video
#include <RH_ASK.h>
#include <SPI.h>
RH_ASK rf_driver;
void setup() {
@zvakanaka
zvakanaka / collapse-expand-pr-files.js
Created August 27, 2021 16:17
Bookmarklet to collapse/expand all PR files (create here: https://caiorss.github.io/bookmarklet-maker/)
Array.from(document.querySelectorAll('[aria-label="Toggle diff contents"]')).forEach(el => el.click())
@zvakanaka
zvakanaka / js-one-liners.md
Last active August 9, 2023 22:01
One-liners in JavaScript

JavaScript One-liners

Arrays

const getRandomItem = (arr) => arr[Math.floor(Math.random() * arr.length)]
const replaceItem = (arr, replacement, i) => [ ...arr.slice(0, i), replacement, ...arr.slice(i + 1) ]