Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@cliffrowley
cliffrowley / STREAMDECK_HID.md
Last active February 20, 2024 06:24
Notes on the Stream Deck HID protocol

Stream Deck Protocol

How to interface with a Stream Deck device.

Synopsis

The device uses the HID protocol to communicate with its software.

Configuration

@Bluefissure
Bluefissure / fix.py
Last active February 9, 2024 05:44
Fix broken palworld save caused by existing guild & too many capture logs
# author: Bluefissure
# License: MIT License
# Description: Fixes Palworld brokwn save files corrupted by someone existing the guild
# Based on the work of https://github.com/cheahjs/palworld-save-tools/releases/tag/v0.13.0
import argparse
import codecs
import os
import json
from lib.gvas import GvasFile
@tigerhawkvok
tigerhawkvok / restartAudio.bat
Created March 4, 2016 20:30
Restart Windows Audio Service (with admin permissions, if needed)
rem Written for buggy audio drivers that need to be restarted
rem In my case, the Claro 8.18 drivers bug out every once in a while on Windows 10, and need restarting to not sound poppy
@echo off
goto check_Permissions
:check_Permissions
echo Administrative permissions required to run this script. Checking...
net session >nul 2>&1

A "node" is an element that looks like this:

{
    "type": "root|literal|argument",
    "parser": "", // only applicable if type is argument
    "properties": {}, // only applicable if type is argument, defaults to empty object
    "executable": true, // default if not specified is false, meaning it isn't a runnable command by itself
    "children": {}, // default if not specified is {}, meaning no children
    "redirect": [] // default if not specified is null, meaning no redirect
}
@davestevens
davestevens / README.md
Created February 19, 2021 17:01
Fetching all comments from a Reddit post

Reddit API

I could not find a simple example showing how to consume the Reddit API to get the comments for a post. This shows step by step how to authenticate and the endpoints to request.

Setup

You need to create an app to get an app id and secret. Go to https://www.reddit.com/prefs/apps and at the bottom of the page under "developed applications" create a new app or view a current one.

If you click "edit" to open the app view you will be able to see the app id and secret, these are required for authentication.

@bittner
bittner / 60-jetbrains.conf
Created September 25, 2015 07:57
Inotify configuration for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm). Create this file with e.g. `sudo vim /etc/sysctl.d/60-jetbrains.conf`
# Set inotify watch limit high enough for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm).
# Create this file as /etc/sysctl.d/60-jetbrains.conf (Debian, Ubuntu), and
# run `sudo service procps start` or reboot.
# Source: https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit
#
# More information resources:
# -$ man inotify # manpage
# -$ man sysctl.conf # manpage
# -$ cat /proc/sys/fs/inotify/max_user_watches # print current value in use
@MWHunter
MWHunter / gist:0d01482be355a73c6b76ff66901a4969
Created October 18, 2021 20:49
Quick java program to wrap a minecraft server and run it anywhere java can be compiled an ran, such as repl.it
import java.io.*;
import java.lang.ProcessBuilder.Redirect;
import java.net.URL;
import java.util.Scanner;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
public class Main {
public static void main(String[] args) throws IOException, InterruptedException {
Scanner userInput = new Scanner(System.in);
// ==UserScript==
// @id iitc-plugin-highlight-resonator-L8-count@RTL
// @name IITC plugin: Highlight portals based on number of 8's
// @category Highlighter
// @version 1.0.0.20200705.1450
// @namespace https://github.com/
// @updateURL https://github.com/
// @downloadURL https://github.com/
// @description Highlight portals based on number of level 8 resonators.
// @include https://www.ingress.com/intel*
@isnot
isnot / adj-portalname-fontsize.user.js
Last active July 8, 2021 07:56
iitc-plugin-adj-portalname-fontsize
// ==UserScript==
// @id iitc-plugin-adj-portalname-fontsize@isnot
// @name IITC plugin: adj-portalname-fontsize
// @category Tweak
// @version 0.2
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @author isnot
// @updateURL none
// @downloadURL none
// @description [iitc-plugins] adj portal name fontsize
@williewillus
williewillus / primer.md
Last active December 20, 2020 08:13
1.8.9 to 1.9 quick primer