Skip to content

Instantly share code, notes, and snippets.

View 0xBADDCAFE's full-sized avatar

shun 0xBADDCAFE

View GitHub Profile
@0xBADDCAFE
0xBADDCAFE / BFD35.pitchlist
Created May 4, 2025 17:43
BFD3.5 drum map for Studio One 6
<?xml version="1.0" encoding="UTF-8"?>
<Music.PitchNameList>
<Music.PitchName pitch="24" name="Kick: Hit"/>
<Music.PitchName pitch="25" name="Snare: Side Stick"/>
<Music.PitchName pitch="26" name="Snare: Hit"/>
<Music.PitchName pitch="27" name="Snare: Drag"/>
<Music.PitchName pitch="28" name="Snare: Half Edge"/>
<Music.PitchName pitch="29" name="Snare: Rim Shot"/>
<Music.PitchName pitch="30" name="Hihat: Closed Tip"/>
<Music.PitchName pitch="31" name="Floor Tom: Hit"/>
@0xBADDCAFE
0xBADDCAFE / docker-compose.yml
Created January 19, 2022 15:08
docker compose file for spigot server
version: "3.8"
services:
mc:
image: itzg/minecraft-server:java16
ports:
# expose the Minecraft server port outside of container
- 25565:25565
- 8123:8123
environment:
mushroom% sudo du -sh /mnt/wsl
0 /mnt/wsl
mushroom% sudo ls -lR /mnt/wsl
/mnt/wsl:
total 0
drwxr-xr-x 4 root root 100 Jul 5 20:15 docker-desktop
drwxr-xr-x 3 root root 60 Jul 5 20:15 docker-desktop-bind-mounts
drwxr-xr-x 5 root root 100 Jul 5 20:15 docker-desktop-data
/mnt/wsl/docker-desktop:
~$ ls -l $(which docker)
lrwxrwxrwx 1 root root 48 Jul 5 12:12 /usr/bin/docker -> /mnt/wsl/docker-desktop/cli-tools/usr/bin/docker
~$ ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 912 580 ? Sl 12:12 0:00 /init
root 49 0.0 0.0 892 80 ? Ss 12:12 0:00 /init
root 50 0.0 0.0 892 80 ? S 12:12 0:00 /init
shun 51 0.0 0.0 718600 16088 pts/0 Ssl+ 12:12 0:00 docker serve --address unix:///home/shun/.docker/run/docker-cli-ap
root 52 0.0 0.0 0 0 ? Z 12:12 0:00 [init] <defunct>
root 61 0.0 0.0 0 0 ? Z 12:12 0:00 [init] <defunct>
// ==UserScript==
// @name NoAd Timeline
// @namespace http://0xbd.cf/
// @version 0.1
// @description display:none; for Ad
// @author 0xBADDCAFE
// @match https://twitter.com/*
// @grant none
// ==/UserScript==
~
❯ setopt
alwaystoend
autocd
autopushd
autoresume
nobgnice
nocaseglob
cdablevars
noclobber
@0xBADDCAFE
0xBADDCAFE / clipboard_image_uploader.user.js
Last active September 11, 2019 05:46
Upload clipboard image to imgur and paste link
// ==UserScript==
// @name kokoro.io clipboard image uploader
// @namespace http://0xbd.cf/
// @version 0.1
// @description Upload clipboard image to imgur and paste link
// @author You
// @match https://kokoro.io/
// @grant none
// ==/UserScript==
fun confirm() = launch {
val location = requestLocationWithCheck()
location?.let{
send(it)
}
fragmentManager.beginTransaction()
.replace(R.id.container, MyFragment.newInstance())
.commit()
}
import android.content.pm.PackageManager
import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine
val runWithCheck: MutableMap<Int, (Boolean) -> Unit> = mutableMapOf()
suspend fun Fragment.withCheck(vararg requests: String, run: (() -> Unit)? = null) = suspendCoroutine<Boolean> { cont ->
val isGranted = requests.map {
import androidx.annotation.StringRes
import androidx.appcompat.app.AlertDialog
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine
class SuspensiveAlertDialogBuilder(val builder: AlertDialog.Builder) {
@StringRes
var positiveTextId: Int? = null
var positiveText: String? = null
@StringRes