Skip to content

Instantly share code, notes, and snippets.

View sayoder's full-sized avatar

Seth Yoder sayoder

  • Pittsburgh, PA
View GitHub Profile
@sayoder
sayoder / ak70.sh
Last active January 28, 2024 03:35
rsync to Astell&Kern AK70 over mtp
#!/bin/bash
# Requirements: go-mtpfs, rsync, fuse2
MUSICDIR="/home/<USER>/Music/"
DEVICEMUSICDIR="/mnt/ak70/Internal storage/Music/"
MOUNTPOINT="/mnt/ak70/"
print_usage() {
echo "Usage: $0 mount|umount|drysync|fullsync|hardsync|sync"
#!/bin/bash
shopt -s globstar
for a in **/*.flac; do
ffmpeg -i "$a" -qscale:a 0 "${a[@]/%flac/mp3}" && rm "$a"
done
#!/usr/bin/python3
import csv
import beets.library
from termcolor import colored
import beets.ui
LIBRARYDB = '/home/MYUSER/.config/beets/library.db'
EXPORTIFY_CSV = './spotify.csv'
#!/bin/bash
echo "Modifying BBB ruby code..."
cd /usr/local/bigbluebutton/core/scripts
mv rap-process-worker.rb rap-process-worker.rb.bak
curl -O https://gist.githubusercontent.com/MortimerMcMire315/d94cc25f446b1a6b0857ebd8f02f8e0b/raw/291dff18c1c740c0ecffea3780ffb89d36196b32/rap-process-worker.rb
chmod +x rap-process-worker.rb
echo "Creating 10 worker processes..."
cd /usr/lib/systemd/system
#!/usr/bin/ruby
# encoding: UTF-8
# Copyright ⓒ 2017 BigBlueButton Inc. and by respective authors.
#
# This file is part of BigBlueButton open source conferencing system.
#
# BigBlueButton is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
124c124
< $sql = "SELECT CONCAT(usr.firstname,' ', usr.lastname) AS name, usr.email,usr.phone2,c.fullname
---
> $sql = "SELECT usr.id, CONCAT(usr.firstname,' ', usr.lastname) AS name, usr.email,usr.phone2,c.fullname
.toolbar-background-md {
background: #57C7D4 !important;
}
.toolbar-background-ios {
background: #57C7D4 !important;
}
.toolbar-background-wp {
import Data.List (elemIndex)
import Data.Maybe (fromJust)
--similar to /u/Ashandalar's definition, but more general just for kicks
-----
data Node a = Node a [Node a] deriving (Show)
-- Wrapper around makeNode. Converts the list to index/value pairs
-- so it's easier to work with. So, [4,0,0,-1,3] becomes .
-- Given [4,0,0,-1,3], returns (makeNode [(0,4),(1,0),(2,0),(3,-1),(4,3)] (3,-1))
[PHP]
engine = On
short_open_tag = Off
asp_tags = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = 17
@sayoder
sayoder / gist:a3c4930cd6b385697cb0
Created June 3, 2014 18:09
python php session file monitoring script
#!/usr/bin/env python3
'''
log_session_file_lifespan.py
Every second, get the contents of the /tmp/ directory. Files starting with sess_
will be tracked, and their lifespan and information will be dumped to a logfile
when they are deleted.
'''
import os