Skip to content

Instantly share code, notes, and snippets.

View yspreen's full-sized avatar
🦆
Working

Nick Spreen yspreen

🦆
Working
View GitHub Profile
---- Minecraft Crash Report ----
// Sorry :(
Time: 2021-01-29 10:54:04 UTC
Description: Watching Server
java.lang.Error: ServerHangWatchdog detected that a single server tick took 60.00 seconds (should be max 0.05)
at gnu.trove.impl.hash.TObjectHash.indexRehashed(TObjectHash.java:216)
at gnu.trove.impl.hash.TObjectHash.index(TObjectHash.java:181)
at gnu.trove.impl.hash.TObjectHash.contains(TObjectHash.java:153)
#!/bin/bash
## Use as ./convert_all.sh [DIRECTORY]
##
## i.e. ./convert_all.sh ~/Downloads
download_file() {
bash AAXtoMP3 --aac -c -e:m4b -t "./out" "$1"
}
#!/bin/sh
vlcconvert() {
######################## Transcode the files using ... ########################
vcodec="mp4v"
acodec="mp4a"
vb="1024"
ab="128"
mux="mp4"
###############################################################################
@yspreen
yspreen / DictionaryKeyPath.swift
Last active November 30, 2022 22:41 — forked from dfrib/DictionaryKeyPath.swift
Swift: Reading and writing to (possible) nested dictionaries for a given key path, using a recursive approach
/*
Copyright 2022 @yspreen
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
do_cut = false
fc = function()
hkc:disable()
if hs.window.focusedWindow():application():bundleID() == "com.apple.finder" then
hs.eventtap.keyStroke({"cmd"}, "C")
do_cut = false
else
hs.eventtap.keyStroke({"cmd"}, "C")
end
@yspreen
yspreen / index.html
Created September 5, 2019 14:58
qBWpbbr
<div class="container">
<span class="lead">Wohnung zur Zwischenmiete:</span>
<span class="lead bg-success ja">Noch Da!</span><br><br>
<p class="lead">
Bitte melden unter <a href="tel:+49123456789">+49 123 456789</a>
</p>
</div>
@yspreen
yspreen / egpu_wake.sh
Last active February 16, 2019 16:45
Automatically keep your MacBook from sleeping, when an eGPU is connected
#!/bin/bash
function no_sleep {
if ! [ -n "${last_pid+x}" ]; then
caffeinate -d &
last_pid=$! &&
echo start caffeinate
fi
sleep 60
}
@yspreen
yspreen / index.html
Created February 10, 2019 16:11
Mars 404 Error Page
<div class="mars"></div>
<img src="https://mars-404.templateku.co/img/404.svg" class="logo-404" />
<img src="https://mars-404.templateku.co/img/meteor.svg" class="meteor" />
<p class="title">Oh no!!</p>
<p class="subtitle">
You’re either misspelling the URL <br /> or requesting a page that's no longer here.
</p>
<div align="center">
<a class="btn-back" href="#">Back to previous page</a>
</div>
@yspreen
yspreen / useful.js
Last active January 15, 2019 21:40
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// ... give time for script to load, then type (or see below for non wait option)
jQuery.noConflict();
setInterval(() => $(".icon-oj:not([src='/images/repliers/crownIcon.png'])").each(function() {$(this).parents("li").remove()}), 100);
i = setInterval(() => {return window.scrollTo(0,document.body.scrollHeight);}
, 1000);
@yspreen
yspreen / script.js
Last active October 30, 2018 14:15
JS snippets
function toBin(i) {
let s = "", flip = i < 0;
i = flip ? ~i : i;
while (i != 0) {
s = (flip ? 1 - (i & 1) : (i & 1)) + s;
i >>= 1;
}
return (flip ? "…1" : "") + (s == "" ? (flip ? "1" : "0") : s);