Skip to content

Instantly share code, notes, and snippets.

Avatar
🎶
I may be slow to respond.

Bobby BobbyWibowo

🎶
I may be slow to respond.
View GitHub Profile
View safe.fiery.me_curl.sh
curl \
-H "token: YOUR_TOKEN_HERE" \
-H "albumid: YOUR_ALBUM_ID_HERE" \
-H "filelength: NUMBER_FROM_5_TO_32" \
-H "age: HOURS" \
-H "striptags: 1_IF_YES" \
-F "files[]=@PATH_TO_FILE" \
https://safe.fiery.me/api/upload
View maganedevgithub.plugin.js
//META{"name":"maganedevgithub"}*//
const maganedevgithub = function() {};
maganedevgithub.prototype.vars = {
className: 'magane-script',
src: 'https://bobbywibowo.github.io/Magane/dist/magane.min.js?_=1613150310',
unloadIds: [
'maganeContainer',
'localStorageIframe'
],
unloadStyles: [
@BobbyWibowo
BobbyWibowo / genshinimpact-3120x1440.json
Last active May 13, 2021
QtScrcpy custom key maps for Genshin Impact.
View genshinimpact-3120x1440.json
{
"switchKey": "Key_QuoteLeft",
"mouseMoveMap": {
"startPos": {
"x": 0.5,
"y": 0.32
},
"speedRatio": 3.5
},
"keyMapNodes": [
View maganedevhosted.plugin.js
//META{"name":"maganedevhosted"}*//
const maganedevhosted = function() {};
maganedevhosted.prototype.vars = {
className: 'magane-script',
src: 'https://i.fiery.me/private/magane.min.js?_=1613150310',
unloadIds: [
'maganeContainer',
'localStorageIframe'
],
unloadStyles: [
View nginx-deny-ip.sh
#!/usr/bin/env bash
NGINX_CONF_PATH="/usr/local/nginx/conf/deny-ips.conf"
if ! [ -f "$NGINX_CONF_PATH" ]; then
echo "Error: '$NGINX_CONF_PATH' is not found."
exit 1
fi
SCRIPT_NAME=$(basename $(readlink -f $0))
@BobbyWibowo
BobbyWibowo / get-backlight
Last active May 28, 2020
Backlight utility
View get-backlight
#!/bin/bash
MAX_PATH="/sys/class/backlight/intel_backlight/max_brightness"
SET_PATH="/sys/class/backlight/intel_backlight/brightness"
MAX=$(cat $MAX_PATH)
CUR=$(cat $SET_PATH)
CURPERCENT=$(printf '%.2f' $(bc -l <<< "$CUR / $MAX * 100"))
printf '%s\n' "Backlight: $CUR/$MAX ($CURPERCENT%)"
View conf.d_yourdomain.com.conf
server {
listen 80;
server_name yoursite.com;
# set $google_analytics_id and include the google_analytics file below
set $google_analytics_id "UA-12345678-9";
include /usr/local/nginx/conf/google-analytics.conf;
location / {
# your normal config goes here...
@BobbyWibowo
BobbyWibowo / functions.md
Last active Nov 22, 2019
Puddletag functions cheatsheet
View functions.md

Tag to Dir

Music/%albumartist%/%album%
Music/$if(%albumartist%,%albumartist%,%artist%)/%album%

Parent dir should already default to $HOME.

View bph.js
// TODO
const args = process.argv.slice(2)
const size = parseFloat(args[0])
const seedtime = parseFloat(args[1])
let seeders = parseInt(args[2])
;(async () => {
if (!args.length)
throw new Error('Usage: bph.js <size=GB> <seedtime=H> [seeders]')