Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am rzabcik on github.
  • I am ryanz (https://keybase.io/ryanz) on keybase.
  • I have a public key whose fingerprint is 0F53 72D5 17D1 08CA 08A9 ABD0 9BE2 668A 86F2 AB77

To claim this, I am signing this object:

@rzabcik
rzabcik / fb.css
Created Mar 29, 2014
Facebook stylesheet for a white background
View fb.css
._5vb_, ._5vb_ #contentCol {
background-color: white;
}
View woodo
if [ $EUID != 0 ]; then
echo "It's a weird tree."
else
echo ' _ __'
echo ' / `\ (~._ ./ )'
echo ' \__/ __`-_\__/ ./'
echo ' _ \ \/ \ \ |_ __'
echo ' ( ) \__/ -^ \ / \'
echo ' \_/ " \ | o o |.. / __'
echo " \\. --' ==== / || / \\ "
@rzabcik
rzabcik / weekly-backup
Created Oct 22, 2013
This is the backup script designed to run every week on tachyon.
View weekly-backup
#!/bin/sh
if [ ! $UID = 0 ]; then
echo -e '\e[31merror: this script needs to be run as root'
exit 1
else
# echo each command before executing to show progress
set -o xtrace
dd if=/dev/disk/by-label/win8 | gzip -c > /mnt/data0/Backup/win8.ntfs.gz
umount /mnt/arch-backup
dd if=/dev/disk/by-label/arch-backup | gzip -c > /mnt/data0/Backup/arch-backup.ext4.gz
@rzabcik
rzabcik / 6h-backup
Last active Dec 26, 2015
This is the backup script designed to run every 6 hours on tachyon.
View 6h-backup
#!/bin/sh
if [ $EUID != 0 ]; then
echo -e '\e[31mError: this script needs to be run as root'
exit 1
else
rsync -aHAX --delete-during --exclude={/lost+found,/var/lib/docker} /mnt/root/ /mnt/arch-backup
if mount | grep -q /mnt/data0-backup; then
if [ -d /mnt/data0-backup/ToMove ]; then
echo -e '\e[31mWarning: there are files to move from data0-backup/ToMove. This directory will be copied to data0.'
cp -rp /mnt/data0-backup/ToMove /mnt/data0/ToMove
@rzabcik
rzabcik / cudaminer-reset
Last active Dec 26, 2015
This script runs cudaminer only if the main display :0 is off. Uses polling every ~10 seconds.
View cudaminer-reset
#!/bin/sh
export DISPLAY=:0
while true; do
# check to see if cudaminer is still alive, (possibly stopped)
if pgrep cudaminer; then
#if the monitor is on
if xset -q | grep -q 'Monitor is On'; then
pkill -STP cudaminer
else
You can’t perform that action at this time.