Skip to content

Instantly share code, notes, and snippets.

View jollyroger's full-sized avatar

Andrii Senkovych jollyroger

  • TRData Limited
  • Ukraine
View GitHub Profile
@jollyroger
jollyroger / clean-ftp.sh
Created February 5, 2010 13:27
Cean incoming cronjob
#!/bin/sh
RMFILE_LOG=`mktemp`
RMFILE_ERR=`mktemp`
RMDIR_LOG=`mktemp`
RMDIR_ERR=`mktemp`
find ~ftp/incoming -mindepth 1 -mount -type f -atime +7 -exec rm -vf {} \; >$RMFILE_LOG 2>$RMFILE_ERR
find ~ftp/incoming -depth -mindepth 1 -mount -type d -empty -exec rmdir -v {} \; >$RMDIR_LOG 2>$RMDIR_ERR
echo "Cleaning FTP incoming directory:"
@jollyroger
jollyroger / fal.sh
Created December 9, 2009 21:50
"Fork, aggregate, log" script
#!/bin/bash
#
# NAME
# fal - wrapper script to run several concurrent commands and gather their
# output into one log file. fal is an abbreviation for "fork, aggregate, log"
#
# SYNOPSIS
# fal -c count [-l logfile] [-t] [-p pipe] [--] command [command_args]
#
# OPTIONS
@jollyroger
jollyroger / interfaces
Created October 24, 2009 07:42
Automatic Wi-Fi the Debian-way
auto wlan0
mapping wlan0
script /usr/local/sbin/wlan-detect.sh
map HomeAP wlan0-home
map OfficeAP wlan0-office
iface wlan0-home inet dhcp
wpa-ssid HomeAP
wpa-psk HomeAccessPointPassphrase
wpa-key-mgmt WPA-PSK