Skip to content

Instantly share code, notes, and snippets.

View banasiak's full-sized avatar

Richard Banasiak banasiak

View GitHub Profile
banasiak / BanasiakCat_V2.xml
Created January 12, 2024 18:06
Color scheme for the new version of logcat
<option name="LOGCAT_V2_LEVEL_ASSERT">
<option name="FOREGROUND" value="ffffff" />
<option name="BACKGROUND" value="9876aa" />
<option name="LOGCAT_V2_LEVEL_DEBUG">
<option name="FOREGROUND" value="0" />
<option name="BACKGROUND" value="aaaaaa" />
banasiak /
Created November 29, 2022 00:22
Hyper-V Enhanced Session (Ubuntu 22.04 LTS)
# Instructions:
# This Script:
# This script is for Ubuntu 22.04 Jammy Jellyfish to download and install XRDP+XORGXRDP via
# source.
# Major thanks to: for the tips.
<scheme name="BanasiakCat" version="142" parent_scheme="Darcula">
<property name="created">2021-11-04T15:11:45</property>
<property name="ide">AndroidStudio</property>
<property name="ideVersion">2020.3.1.24</property>
<property name="modified">2021-11-04T15:11:52</property>
<property name="originalScheme">BanasiakCat</property>
<option name="LOGCAT_ASSERT_OUTPUT">
banasiak /
Last active November 23, 2019 17:38
A python script that polls the CheerLights API and sets the LEDs of a Blinkt! hat.
# curl | bash
import blinkt
import requests
from collections import deque
from requests.adapters import HTTPAdapter
from requests.exceptions import ConnectionError
from sys import exit
from time import sleep
# pip3 install RPI.GPIO
# pip3 install adafruit-circuitpython-ads1x15
import board
import busio
import adafruit_ads1x15.ads1115 as ADS
import RPi.GPIO as GPIO
from adafruit_ads1x15.analog_in import AnalogIn
from board import SCL, SDA
from math import floor
private class DebugModeTapListener implements View.OnClickListener {
private int tapCount = 0;
private long lastTap = SystemClock.elapsedRealtime();
public void onClick(final View v) {
final Context context = getApplicationContext();
long currentTap = SystemClock.elapsedRealtime();
if (currentTap - lastTap < 500) {
banasiak / DefaultKeyBindings.dict
Last active October 29, 2018 23:01 — forked from Jimbly/DefaultKeyBindings.dict
Mac OSX keybindings to more closely match Windows
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more closely
match default behavior on Windows systems.
You must log out and back in to see these changes.
Here is a rough cheatsheet for syntax.
Key Modifiers
^ : Ctrl
$ : Shift
banasiak /
Created September 13, 2018 14:37 — forked from kenmickles/
Shell script to dynamically update a Digital Ocean DNS record
TOKEN="Get token from"
IP=`curl -s | grep -Eo '[0-9\.]+'`
# to get record id:
# curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $TOKEN" "$DOMAIN/records"
echo "Formatting code..."
./gradlew googleJavaFormat formatKotlin --daemon
if [ "$status" = 0 ]; then
echo "Formatting complete - adding files to Git"
git add .
exit 0