Skip to content

Instantly share code, notes, and snippets.

@bostrt
bostrt / example.adoc
Created November 13, 2023 16:44
example adoc

Example Doc

Example content.

@bostrt
bostrt / bali-motorization-routine.sh
Last active November 12, 2023 20:17
Bash script for running Bali Blinds routines
#!/bin/bash
set -e
command -v jq >/dev/null 2>&1 || { echo >&2 "I require jq but it's not installed (see: https://stedolan.github.io/jq/). Aborting."; exit 1; }
command -v curl >/dev/null 2>&1 || { echo >&2 "I require curl but it's not installed (see: https://curl.haxx.se/). Aborting."; exit 1; }
command -v websocat >/dev/null 2>&1 || { echo >&2 "I require websocat but it's not installed (see: https://github.com/vi/websocat/releases). Aborting."; exit 1; }
# Adapted from:
# https://gist.github.com/cgmartin/466bd2d3724de6c04743d61cf0de2066
@bostrt
bostrt / snippet.js
Created April 6, 2022 18:31
Multi-sprite avatar by room example
// The following changes will allow for multi-sprite avatars, per room.
// I've enabled the following hacks:
// - multi-sprite-avatar
// - avatar-by-room
///////////////////////////////////////
// Updates to multi-sprite-avatar hack
///////////////////////////////////////
// - Convert the pieces array to a dictionary with the key being a room ID and the value being the array of sprite pieces.
@bostrt
bostrt / gist:e4ba546e39fd6609a83745b9c56ba9e6
Last active January 15, 2021 02:59
Upload BSaber Playlist to Quest via BMBF

Get playlist:

# QUEST_IP=192.168.x.x
# PLAYLIST_URL=https://bsaber.com/PlaylistAPI/18-08-06_songs-with-fantastic-flow-vol-1_elliotttate.bplist
# PLAYLIST_NAME=$(basename $PLAYLIST_URL) 
# wget $PLAYLIST_URL

Download each song from playlist:

'use strict';
const QuestGoal = require('../../../src/QuestGoal');
/**
* A quest goal requiring the player to locate a NPC.
* TODO: Add Dead-or-Alive feature.
*/
class BountyGoal extends QuestGoal {
constructor(quest, config, player) {
@bostrt
bostrt / ModSecurityInXMinutes.md
Last active November 22, 2016 17:12
ModSecurity in X Minutes

ModSecurity In X Minutes

There are just a few fundamental pieces to learn in order to get started with ModSecurity.

  • Phases
  • Actions and Rules
  • Collections

Phases

09-16 20:02:37.255 9920 9920 D AndroidRuntime: Shutting down VM
09-16 20:02:37.258 9920 9920 E AndroidRuntime: FATAL EXCEPTION: main
09-16 20:02:37.258 9920 9920 E AndroidRuntime: Process: com.xabber.android.beta, PID: 9920
09-16 20:02:37.258 9920 9920 E AndroidRuntime: java.lang.IllegalArgumentException: Invalid notification (no valid small icon): Notification(pri=0 contentView=com.xabber.android.beta/0x1090086 vibrate=default sound=content://settings/system/notification_sound defaults=0x6 flags=0x1 color=0x00000000 vis=PRIVATE)
09-16 20:02:37.258 9920 9920 E AndroidRuntime: at android.app.NotificationManager.notify(NotificationManager.java:222)
09-16 20:02:37.258 9920 9920 E AndroidRuntime: at android.app.NotificationManager.notify(NotificationManager.java:194)
09-16 20:02:37.258 9920 9920 E AndroidRuntime: at com.xabber.android.data.notification.NotificationManager.notify(NotificationManager.java:448)
09-16 20:02:37.258 9920 9920 E AndroidRuntime: at com.xabber.android.data.notification
@bostrt
bostrt / fuzzytime_again.js
Last active January 3, 2016 09:49
fuzzytime rewrite
(function(root){
'use strict';
var FuzzyTime = function() {
this.ats = [];
this.befores = [];
this.afters = [];
};