Skip to content

Instantly share code, notes, and snippets.

View sinewalker's full-sized avatar

Michael Lockhart sinewalker

View GitHub Profile
@sinewalker
sinewalker / copy-mc-saves.md
Last active September 7, 2017 21:15
Steps for copying Minecraft saves to a PC

Steps for copying Minecraft saves to a PC

(There's more of this Gist than will fit in the preview. Click on it to see the whole thing)

First, open, play and then quit Minecraft at least once; to make a .minecraft appdata folder)

  1. Open Windows Explorer (press Win+R, then type explorer)
  2. Go to the %appdata% directory. There should be a folder called .minecraft listed
  3. Open the .minecraft folder. There should be a saves folder in it.
@sinewalker
sinewalker / accellerologger.ino
Last active September 9, 2017 10:02
EJBlogger's Accellerologger code
#include <SparkFun_ADXL345.h>
#include <SD.h>
#include <SPI.h>
//ADXL345 adxl = ADXL345(10); For SPI Cumunication
ADXL345 adxl = ADXL345();
File myFile;
const int threshold = 1499;
const int switchPin = 7;
int switchState;
@sinewalker
sinewalker / rpsls.md
Last active February 5, 2018 09:14
Rock, Paper, Scissors, Lizard, Spock

Rock, Paper, Scissors, Lizard, Spock

  • Scissors cut Paper

  • Paper covers Rock

  • Rock crushes Lizard

  • Lizard poisons Spock

  • Spock smashes Scissors

  • Scissors decapitate Lizard

@sinewalker
sinewalker / gpg-cheats.md
Last active September 23, 2017 02:07
GPG Cheat Sheet

Quick'n easy gpg cheatsheet

Just a brief explanation of some of the command line functionality from gnu privacy guard (gpg).

-- Originaly from http://irtfweb.ifa.hawaii.edu/~lockhart/gpg/ (no relation)

Create a key:

gpg --gen-key generally you can select the defaults.

@sinewalker
sinewalker / shrug.txt
Created October 19, 2017 01:45
shrug
¯\_(ツ)_/¯
@sinewalker
sinewalker / win-timezone-information.reg
Last active January 27, 2023 09:09
Make Windows 7+ use UTC Real-time-clock
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001
@sinewalker
sinewalker / irish-cream.md
Last active July 20, 2019 10:51
Whiskey Cream

Whiskey Cream

Per batch (about 870ml)

  • 1 teaspoon unsweetened cocoa powder
  • 1 teaspoon instant coffee powder
  • 1 cup (235 ml) thickened/whipping cream
  • 1 (400 ml) can sweetened condensed milk
  • ½ teaspoon vanilla extract
@sinewalker
sinewalker / firefox-reverse-wheel.md
Last active November 8, 2023 08:47
Firefox Reverse/"Natural" scroll wheel direction

Open about:config and set mousewheel.default.delta_multiplier_y to negative, e.g. -100 if the current value is (the default) 100

This should only be necessary on platforms where Firefox isn't honouring the global setting. For instance on a Mac or Windows it's not necessary if you've set the scrolling direction to reverse globally, but on Linux, Firefox doesn't honour KDE's setting. I haven't tested GNOME ….

The default setting is fine for an actual mouse-wheel, but when using a touchpad to two-finger-scroll (or a trackball), it's more Natural for the page to scroll down when you swipe your fingers up: it seems more like how a paper page will shift.

@sinewalker
sinewalker / bach-wtc1-1.rb
Last active February 26, 2018 12:09
Bach Well Tempered Clavier, Book 1, Prelude 1 (Sonic Pi)
#### Sonic Pi -*- mode:ruby -*-
# Bach Preludes & Fugues 1-12 Well Tempered Clavier
# Book 1, Prelude 1. Transcribed from
# https://www.youtube.com/watch?v=2oFjk0HynY4
define :bach do |n|
#play an array of notes twice, with the last 3 repeated each time
#this is the pattern used repeatedly in Prelude no.1
2.times do
@sinewalker
sinewalker / compositing.md
Created March 9, 2018 23:30
Toggle compositing in KDE

qdbus org.kde.KWin /Compositor org.kde.kwin.Compositing.active

Gives you true or false depending on whether it is currently enabled or not

You can enable compositing by calling

qdbus org.kde.KWin /Compositor org.kde.kwin.Compositing.resume

and disable by calling