Skip to content

Instantly share code, notes, and snippets.

View slabua's full-sized avatar
🛠️
Tinkering

Salvatore La Bua slabua

🛠️
Tinkering
View GitHub Profile
@guidoism
guidoism / layers.json
Created November 4, 2022 17:16
Keymap Status Viewer
["TAB q w e r t y u i o p BS \nCTL a s d f g h j k l :; RET\nSFT z x c v b n m , . / \u25cc\n \u25cc \u25cc OPT CMD M1 M3 \u2423 M2 \u25cc \u25cc \u25cc \u25cc", " ~ ! @ # $ % ^ 7 8 9 \u25cc \u25cc\n \u25cc \" & * _ \u25cc + 4 5 6 ' |\n \u25cc \u25cc \u25cc \u25cc \u25cc . 0 1 2 3 / \u25cc\n \u25cc \u25cc OPT CMD \u25c9 \u25cc \u25cc M5 \u25cc \u25cc \u25cc \u25cc", " ` \u25cc \u25cc \u25cc \u25cc \u25cc \u25cc \u25cc \u25cc \u25cc \u25cc BS\n \u25cc [ ] ( ) \u25cc \u25cc - = \u25cc \u25cc \\\n \u25cc < > { } \u25cc \u25cc \u25cc \u25cc \u25cc \u25cc \u25cc\n \u25cc \u25cc OPT CMD M4 \u25cc \u25cc \u25c9
@todbot
todbot / displayknob_test1.py
Created July 1, 2022 23:26
Demonstrate round LCD as a display knob, using GC9A01 round TFT LCD and rotary encoder
# displayknob_test1.py -- Demonstrate round LCD as a display knob
#
# 1 Jul 2022 - @todbot / Tod Kurt
#
# You'll need to install 'adafruit_display_text', 'adafruit_imageload'
# and 'gc9a01' library.
# Easiest way is from Terminal:
# circup install adafruit_display_text adafruit_imageload gc9a01
#
@josefadamcik
josefadamcik / SofleKeyboard.kbd.json
Last active December 17, 2025 08:45
SofleKeyboard
[
{
"name": "SofleKeyboard",
"author": "Josef Adamcik",
"switchMount": "cherry"
},
[
{
"y": 0.2,
"x": 3,
@baligena
baligena / vim-cheatsheet.md
Last active February 10, 2024 13:57 — forked from azadkuh/vim-cheatsheet.md
vim / vimdiff cheatsheet - essential commands

Vim cheat sheet

Starting Vim

vim [file1] [file2] ...

Table of contents

@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active July 3, 2025 21:22
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created
@dokato
dokato / orthogonalization.py
Created February 15, 2018 14:13
Find closest orthogonal matrix
import numpy as np
def find_closest_orthogonal_matrix(A):
'''
Find closest orthogonal matrix to *A* using iterative method.
Bases on the code from REMOVE_SOURCE_LEAKAGE function from OSL Matlab package.
Args:
A (numpy.array): array shaped k, n, where k is number of channels, n - data points
@brentajones
brentajones / blinkt-weather.py
Last active February 4, 2021 12:24
A weather status script for the Raspberry Pi and Blinkt module
import json, time, os.path
import blinkt, requests
status_colors = {'current':[1,1,1],'high':[1,0,0],'low':[0,0,1],'precip':[0,1,0]}
blinkt.set_clear_on_exit()
blinkt.set_brightness(.1)
def getForecast(key,lat,lng):
url = 'https://api.darksky.net/forecast/' + key + '/' + str(lat) + ',' + str(lng)
@htruong
htruong / chroot-to-pi.sh
Last active February 2, 2026 15:43
Chroot to pi sd card
#!/bin/bash
# This script allows you to chroot ("work on")
# the raspbian sd card as if it's the raspberry pi
# on your Ubuntu desktop/laptop
# just much faster and more convenient
# credits: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689
# make sure you have issued
@rodrigobdz
rodrigobdz / import_bash_aliases.fish
Last active February 23, 2025 00:25 — forked from HiR0GeN/import_bash_aliases.fish
Fish function to import bash aliases to fish abbreviations
# Fish function to import bash aliases v0.2
# Copyright (C) 2016 Malte Biermann
# Copyright (C) 2017 Rodrigo Bermudez Schettino
# Released under the GPL
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@gka
gka / make-animated-gifs-using-ffmpeg.md
Last active June 23, 2025 23:20
how to make a nice GIF from png frames

Make sure ffmpeg is up-to-date:

brew update
brew upgrade ffmpeg

Convert a MOV into frames. Tweak the 2/1 if you want more or fewer frames.