Skip to content

Instantly share code, notes, and snippets.

@nl5887
nl5887 / transfer.fish
Last active March 22, 2022 09:07
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
function transfer
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
return 1
end
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file
@coderofsalvation
coderofsalvation / loopcrossfade
Last active June 1, 2022 05:32
bashscript which turns an wavfile into a seamless loopable wavfile (using a crossfade technique). The faderatio indicates the length of the fade used, the higher the number the shorter the fade.
# makes a audiofile to loop itself (seamless by using a crossfade trick) (needs sox audio utilities)
# @dependancy sox
# Usage: ./loopcrossfade <input.wav> <faderatio> [outputdir]
#
loopcrossfade(){
input="$1"; faderatio="$2"; outputdir="$3"; tmpinput="/tmp/$(basename "$input").loopcrossfade.wav"
[[ ! -f "$input" ]] && echo "cannot find $1" && exit 1
valid=$(echo "$faderatio > 1.99" | bc -l );
(( $valid == 0 )) && echo "faderatio should be 2.0 or bigger" && exit 1
@tuzz
tuzz / github.css
Last active April 23, 2024 15:47
Github Markdown Stylesheet
/*
Copyright (c) 2017 Chris Patuzzo
https://twitter.com/chrispatuzzo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@selwin
selwin / innobackupex-runner.sh
Created August 8, 2011 04:46 — forked from dalecaru/innobackupex-restore.sh
Script to run innobackupex script (for all databases on server), check for success, and apply logs to backups.
#!/bin/sh
#
# Script to run innobackupex script (for all databases on server), check for success, and apply logs to backups.
#
# (C)2010 Owen Carter @ Mirabeau BV
# This script is provided as-is; no liability can be accepted for use.
# You are free to modify and reproduce so long as this attribution is preserved.
#
INNOBACKUPEX=innobackupex-1.5.1