Skip to content

Instantly share code, notes, and snippets.

@cmprescott
cmprescott / Ubuntu_Steps.sh
Last active August 29, 2015 14:21
Hauppauge WinTV-HVR-2255 Firmware Install
# Need this firmware file first
cd /lib/firmware
sudo wget http://www.steventoth.net/linux/hvr22xx/firmwares/4019072/NXP7164-2010-03-10.1.fw
# This project is magic and checks out media_tree and builds it
cd ~
mkdir src
cd src
git clone git://linuxtv.org/media_build.git
cd media_build
@cmprescott
cmprescott / crontab_optware_example
Created February 1, 2015 22:14
Example of the format Optware's crontab uses
# /opt/etc/crontab example
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/sbin:/opt/bin
MAILTO=""
HOME=/
# ---------- ---------- Default is Empty ---------- ---------- #
40 7 * * 1-5 admin /opt/etc/cron.d/some_script.sh >> /opt/var/log/cron.log 2>&1
@cmprescott
cmprescott / setup_optware_cron.sh
Last active August 29, 2015 14:14
Install and setup Optware cron on an Asus RT-N56U
# Install curl to get around Asus wget limitations
ipkg install curl
# Install cron from optware's repository
ipkg install cron
# Remove the old startup script
rm /opt/etc/init.d/S10cron
# Download my startup script that also fixes file permissions
@cmprescott
cmprescott / S10cron
Last active April 20, 2018 02:17
optware cron startup script that also sets correct file permissions
#!/bin/sh
#
# Startup script for optware cron
#
# Fix file permissions
# Cron throws an error if these files are anything other than RW by owner
chmod 600 /opt/etc/crontab
chmod -R 600 /opt/etc/cron.d/
#!/bin/bash
#
# FILE:
# prepend_random_num.sh
# ABOUT:
# Prepends a random number between 1-65000 and an underscore to all files of specified type
# Runs on Mac OSX & Linux
# EXAMPLE:
# $ ls
# a.jpg b.jpg