Skip to content

Instantly share code, notes, and snippets.

@Zeryther
Zeryther / extract.sh
Created Aug 24, 2021
Extract specific table data from a huge mysqldump file
View extract.sh
# Extracts all lines that start with INSERT INTO `server`
sed -n -e '/^INSERT INTO `server`/p' mysqldump.sql > extract.sql
@Zeryther
Zeryther / buildtools.sh
Created Jun 4, 2021
Running BuildTools easily
View buildtools.sh
wget -O BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
git config --global --unset core.autocrlf
java -jar BuildTools.jar
@Zeryther
Zeryther / gist:a5fb21d129dac45b4329f4d0fb15c92b
Created Mar 20, 2021
Uninstall all versions of Java on Debian
View gist:a5fb21d129dac45b4329f4d0fb15c92b
dpkg-query -W -f='${binary:Package}\n' | grep -E -e '^(ia32-)?(sun|oracle)-java' -e '^openjdk-' -e '^icedtea' -e '^(default|gcj)-j(re|dk)' -e '^gcj-(.*)-j(re|dk)' -e '^java-common' | xargs apt-get -y remove
apt-get -y autoremove
View gist:6af1a548a73c55703a1f8527200a0562
echo 'deb http://ftp.debian.org/debian stretch-backports main' | tee /etc/apt/sources.list.d/stretch-backports.list
apt update
apt install -y openjdk-11-jdk
java -version
@Zeryther
Zeryther / README.md
Created Mar 4, 2021
Docker for Desktop starting issue
View README.md

error during connect: Get https://192.168.99.100:2376/v1.38/containers/json: dial tcp 192.168.99.100:2376: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

If you know this error and use the Docker for Desktop you may have previously used Docker Toolbox. I created this Gist in case I run into this issue again at some point so I don't have to look for the solution all over again.

Basically just clear the environment variables in Windows set by the previous Docker Toolbox installation, restart the termain and it should work.

Found the solution here.

@Zeryther
Zeryther / remove-promoted-trends.js
Created Sep 28, 2019
Remove promoted trending topics on Twitter
View remove-promoted-trends.js
@Zeryther
Zeryther / script.js
Created Aug 24, 2019
YouTube Disable Polymer Greasemonkey
View script.js
// ==UserScript==
// @name YouTube Classic for 2018 (Polymer Disable)
// @namespace https://github.com/davidbailey95
// @version 0.2.0
// @description Redirect YouTube pages to the classic design
// @author /u/ndogw and davidbailey95
// @match *://www.youtube.com/*
// @exclude *://www.youtube.com/embed/*
// @run-at document-start
// @grant none
@Zeryther
Zeryther / wslgit.bat
Created Jun 17, 2019
Use this as a replacement for the git executable in JetBrains IDEs to run Git from WSL - modified version of https://stackoverflow.com/a/43878654/4117923
View wslgit.bat
@echo off
setlocal enabledelayedexpansion
set command=%*
set find=C:\Users\%USERNAME%\AppData\Local\Temp\git-commit-msg-.txt
set replace=/mnt/c/Users/%USERNAME%/AppData/Local/Temp/git-commit-msg-.txt
call set command=%%command:!find!=!replace!%%
echo | C:\Windows\System32\wsl.exe cd "`wslpath '%cd%'`" && git %command%
@Zeryther
Zeryther / keybase.md
Created Sep 8, 2016
Keybase.io verification
View keybase.md

Keybase proof

I hereby claim:

  • I am Zeryther on github.
  • I am zeryther (https://keybase.io/zeryther) on keybase.
  • I have a public key whose fingerprint is A0FC 34DE 072B 3860 2808 8DA9 0E64 E2F6 AF08 9433

To claim this, I am signing this object:

@Zeryther
Zeryther / ForceEnd.java
Last active Oct 8, 2015 — forked from aadnk/ForceEnd.java
Force the end credits on an unsuspecting player.
View ForceEnd.java
package com.comphenix.example;
import net.minecraft.server.v1_8_R3.EntityPlayer;
import net.minecraft.server.v1_8_R3.PacketPlayOutGameStateChange;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.craftbukkit.v1_4_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;