Skip to content

Instantly share code, notes, and snippets.

View Siphonay's full-sized avatar

Siph Siphonay

View GitHub Profile
@Siphonay
Siphonay / db_backup_script.sh
Last active December 23, 2022 17:17
donphan.social DB backup script
#!/bin/bash
backup_folder="${HOME}/backup"
# Finding the latest backup
latest_backup=$(find "${backup_folder}" -type f -name "donphan_social_db_backup_*" | head -1)
# If latest backup exists, check if enough space
if [ -n "${latest_backup}" ]
then
@Siphonay
Siphonay / .Xresources
Created October 8, 2018 13:16
rxvt-unicode xrdb configuration to integrate it into the default Ubuntu desktop
! do not scroll with output
URxvt*scrollTtyOutput: false
! scroll in relation to buffer (with mouse scroll or Shift+Page Up)
URxvt*scrollWithBuffer: true
! scroll back to the bottom on keypress
URxvt*scrollTtyKeypress: true
! hide scrollbar
@Siphonay
Siphonay / mastomutant.sh
Last active August 27, 2018 19:30
Updates Mutant Standard Emoji on a non-Dockerized Mastodon instance. If you use this, you'll need 'wget' and 'unzip'.
#!/bin/bash
_name='MastoMutant Emoji Import'
_author='https://monsterpit.net/@daggertooth'
_version=2018.05.23.1
### PATHS! ###
# Where to put the Mutant Standard archives and extracted files.
mutant_dir="$HOME/mutant"
@Siphonay
Siphonay / widetooter.rb
Last active May 8, 2018 09:36
Widetooter
#!/usr/bin/env ruby
abort "please write your string as an argument" unless ARGV[0]
puts ARGV.join(' ').gsub(/[^a-z \n]/i, '').chars.map { |letter|
if letter.ord.between? 'a'.ord, 'z'.ord then
letter = " :#{letter}_wide:"
else
letter = letter
end }.join