by admin | Nov 19, 2020 | Development, Git
0. Back up Gogs and dump the database You’ll want to grab a database dump before you continue. gogs backup doesn’t perform a database dump, at least not in the traditional sense. Instead, it queries the database for information and stores it in a database-agnostic...
by admin | Aug 4, 2014 | Bash, Streaming
rtmpdump -v -m6 -B6 -r rtmp://URL -o /tmp/test.flv &> /tmp/rtmpdump.info; cat /tmp/rtmpdump.info | grep INFO
by admin | Feb 11, 2012 | Bash, Linux, Networking, OSX
Put in cron or run manually. #!/bin/bash # If this is our first run, save a copy of the system’s original hosts file and set to read-only for safety if [ ! -f /etc/hosts.bak ] then echo “Saving copy of system’s original hosts file…” sudo...
by admin | Apr 22, 2011 | Bash, Networking, Streaming
#!/bin/bash mpixW=250 mpixH=300 if [ “x`which identify`” != x ] ; then echo `which identify` found! echo Tossing images less than $mpixW pixels. while true ; do read img imgType=$( expr `identify -format ‘%e’ “$img”` ) if [...
by admin | Apr 6, 2011 | Bash
echo “Please wait while I sort your files by date.” for a in *.jpeg; do date -r $a +%y%m%d >/dev/null && { dof=$(date -r $a +%y%m%d) if [ ! -d $dof ]; then mkdir $dof fi mv $a $dof/ }...
by admin | Mar 18, 2011 | Debian, Development, Perl
#!/usr/bin/perl -w # Modules Needed: # apt-get install libssl-dev # perl -MCPAN -e shell # install Net::SSLeay # install IO::Socket::SSL # install Authen::SASL # install Net::SMTP::SSL use Net::SMTP::SSL; sub send_mail { my $to = $_[0]; my $subject = $_[1]; my $body =...