Skip to content

Instantly share code, notes, and snippets.


Richard Banasiak banasiak

View GitHub Profile
Karn / LogController.kt
Last active July 11, 2022 03:23
An example implementation of a process to write logs to disk asynchronously using RxJava
View LogController.kt
typealias LogElement = Triple<String, Int, String?>
object LogController {
private var flush = BehaviorSubject.create<Long>()
private var flushCompleted = BehaviorSubject.create<Long>()
private var LOG_LEVELS = arrayOf("", "", "VERBOSE",
whizzzkid / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Last active December 3, 2022 15:43
[XPS 15 Early 2017 9560 kabylake] Making Nvidia Drivers + (CUDA 8 / CUDA 9 / CUDA 9.1) + Bumblebee work together on linux ( Ubuntu / KDE Neon / Linux Mint / debian )
View XPS-15 9560 Getting Nvidia To Work on KDE Neon
# Instructions for 4.14 and cuda 9.1
# If upgrading from 4.13 and cuda 9.0
$ sudo apt-get purge --auto-remove libcud*
$ sudo apt-get purge --auto-remove cuda*
$ sudo apt-get purge --auto-remove nvidia*
# also remove the container directory direcotory at /usr/local/cuda-9.0/
# Important libs required with 4.14.x with Cuda 9.X
$ sudo apt install libelf1 libelf-dev

Hiding API keys in

  1. Add the API key to your file:
  1. Add to the root level of your app-level build.gradle file:
echo Converting $1
mkdir -p res/drawable-mdpi
mkdir -p res/drawable-hdpi
mkdir -p res/drawable-xhdpi
mkdir -p res/drawable-xxhdpi
eyecatchup /
Last active June 23, 2020 02:32
A step-by-step guide how to manually flash the Android 5.0.1 (LRX22C) OTA-Update on a Nexus 5 with modified system (custom recovery/kernel, rooted, modified framework etc.)..

Update: For those interested, here's the version for updating from Android 5.1.0 (LMY47D/LMY47I) to Android 5.1.1 (LMY48B):

     SET `VERSION`='5.0.1', `BUILD`='LRX22C', `RECOVERY`='CUSTOM', `ROOTED`=1 
   WHERE `VERSION`='5.0' && `BUILD`='LRX21O' && `RECOVERY`='CUSTOM' && `ROOTED`=1 
         && `WANNA_KEEP_USERDATA`=1;
Jimbly / DefaultKeyBindings.dict
Last active January 8, 2023 22:17
Mac OSX keybindings to more closely match Windows
View DefaultKeyBindings.dict
/* ~/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
kenmickles /
Last active April 11, 2022 19:47
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"
ybakos /
Created November 27, 2012 00:52
A simple example of using an Android Renderer to illustrate OpenGL ES boilerplate.
* Author: Yong Bakos
* Since: 11/26/2012
* Thanks to:
* Cube:
* OpenGL Boilerplate:
package com.humanoriented.sudoku;
import java.nio.ByteBuffer;
amarraja / gist:3938304
Created October 23, 2012 11:35
Replace system notepad with notepad++
View gist:3938304
REM Replaces notepad.exe with notepad++. Here for reference since I can never find it
REM Taken from here:
@echo off
echo Create Backup copies of the original notepad.exe
copy C:\Windows\notepad.exe C:\Windows\notepad32.exe
copy C:\Windows\System32\notepad.exe C:\Windows\System32\notepad32.exe
copy C:\Windows\SysWOW64\notepad.exe C:\Windows\SysWOW64\notepad32.exe