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 keybase.md

Keybase proof

I hereby claim:

  • I am BobbyWibowo on github.
  • I am bobbywibowo (https://keybase.io/bobbywibowo) on keybase.
  • I have a public key whose fingerprint is 39AE 53A2 29C2 4717 57FC 53E7 51C3 A1E1 E22D 26CF

To claim this, I am signing this object:

@BobbyWibowo
BobbyWibowo / csfip.sh
Created Oct 25, 2018
A simple command-line utility to submit a new IP to Cloudflare firewall
View csfip.sh
#!/usr/bin/env bash
ZONE_ID=""
EMAIL=""
API_KEY=""
LOG_FILE="csfip.log"
if [ $# -eq 0 ]; then
echo "USAGE : csfip.sh <IP_ADDRESS> [MODE=challenge] [...NOTES=Submitted with csfip.sh]"
echo "EXAMPLE : csfip.sh 123.44.55.66 block Spam bot"
@BobbyWibowo
BobbyWibowo / alacritty-arc-dark.yml
Created Feb 12, 2019
Arc Dark colorscheme for Alacritty
View alacritty-arc-dark.yml
# Colors (Arc Dark)
colors:
# Default colors
primary:
background: '0x383c4a'
foreground: '0xd3dae3'
# Normal colors
normal:
black: '0x4b5164'
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]')
@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 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 / 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 xorg.conf
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection
Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "PCI:0:2:0"
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))
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