Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Twitch game title shortener
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Removes The Legend of Zelda from game titles on the sidebar of Twitch
// @author nfaltermeier
// @match https://www.twitch.tv/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
/* Recursively fixes react/jsx-curly-brace-presence ex. changes <div id={'container'}> to <div id="container"> */
const fs = require('fs');
const path = require('path');
// List all files in a directory in Node.js recursively in a synchronous fashion
const walkSync = (dir, fileExt, filelist = []) => {
fs.readdirSync(dir).forEach((file) => {
/* eslint-disable no-param-reassign */
if (fs.statSync(path.join(dir, file)).isDirectory() && file !== 'node_modules') {
filelist = walkSync(path.join(dir, file), fileExt, filelist);
@nfaltermeier
nfaltermeier / autoexec.cfg
Last active November 21, 2020 20:36
My autoexec configuration file for CS:GO
//CROSSHAIR SETUP\\
cl_crosshair_drawoutline 1
cl_crosshair_outlinethickness 1
cl_crosshairalpha 255
cl_crosshaircolor 1
cl_crosshairdot 0
cl_crosshairgap -1
cl_crosshairsize 2.5
cl_crosshairstyle 4
cl_crosshairthickness 1
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
public class GetURLContents {
public static void main(String[] args) {
try {
org.gradle.tooling.model.UnsupportedMethodException: Unsupported method: HierarchicalEclipseProject.getIdentifier().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.
at org.gradle.tooling.model.internal.Exceptions.unsupportedMethod(Exceptions.java:33)
at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter$InvocationHandlerImpl.invoke(ProtocolToModelAdapter.java:357)
at com.sun.proxy.$Proxy31.getIdentifier(Unknown Source)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultOmniEclipseProject.from(DefaultOmniEclipseProject.java:250)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultOmniEclipseProject.from(DefaultOmniEclipseProject.java:246)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultOmniEclipseGradleBuild.from(DefaultOmniEclipseGradleBuild.java:46)
@nfaltermeier
nfaltermeier / gist:4918fc5bf1a9fcd994626770db29f272
Last active May 15, 2016 03:07
Some code I need my friend to help with. The 1st line of code in main(String[] args) doesn't work but the 2nd does.
public static void main(String[] args)
{
System.out.println(getNumberAtDigit(4532, 3));
System.out.println(getNumbetAtDigit(4532, 4));
}
/**
* Digits go from left to right, starting at 1
*
* @param source