This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
shopt -s globstar | |
for a in **/*.flac; do | |
ffmpeg -i "$a" -qscale:a 0 "${a[@]/%flac/mp3}" && rm "$a" | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.toolbar-background-md { | |
background: #57C7D4 !important; | |
} | |
.toolbar-background-ios { | |
background: #57C7D4 !important; | |
} | |
.toolbar-background-wp { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
NewerOlder