Skip to content

Instantly share code, notes, and snippets.

View fuzzmz's full-sized avatar

Serban Constantin fuzzmz

View GitHub Profile
@fuzzmz
fuzzmz / highlight.md
Created March 23, 2012 09:21
pelican/md code highlight example

This is a really simple bash script which creates a .tar.gz archive of the folders I specify. I could further improve the script by making it do incremental backups instead of creating a new archive each day, but considering that this is a fast and dirty version of it, and that I don't have that much stuff to back up, it'll do for now.

:::bash
#!/bin/sh
date
echo "############### Backing up files on the system... ###############"

backupfilename=server_file_backup_`date '+%Y-%m-%d'`

echo "----- Now tar, then zip up all files to be saved -----"

@fuzzmz
fuzzmz / 2012_01_22-play_with_python.md
Created March 21, 2012 06:23
pelican md article example
@fuzzmz
fuzzmz / 2012_01_20-backups.md
Created February 26, 2012 14:35
Backups blog post markdown syntax

Date: 2012-01-20 03:38 Title: Up, up, backup! Tags: backup, ftp, archive Category: linux Slug: backups

As I was saying at the end of the last post, locking myself out of the server really made me want to have implemented my backup mechanism sooner, especially considering that at this point in the life of QWERTY (my VPS) there isn't that much to back up.

In short, my backup needs are simple:

@fuzzmz
fuzzmz / h1e9.py
Created February 24, 2012 01:12
Udacity CS101 Homework 1 Ex 9
#Given a variable, x, that stores
#the value of any decimal number,
#write Python code that prints out
#the nearest whole number to x.
#You can assume x is not negative.
# x = 3.14159 -> 3 (not 3.0)
# x = 27.63 -> 28 (not 28.0)