Skip to content

Instantly share code, notes, and snippets.

@opie4624
opie4624 / tarsnap-install.sh
Last active December 11, 2015 00:17 — forked from mdigital/tarsnap-install.sh
Debian / Ubuntu Tarsnap installation
#!/bin/sh
# Installs tarsnap client on Debian and Ubuntu
#
# You'll need to setup an account at
# http://www.tarsnap.com
# and load it with some funds
#
# Make sure you run this as root
#
var fs = require('fs');
var email_file = process.argv[2];
var ws = fs.createWriteStream('/var/node/log.txt', {flags: 'a+', mode: 0666});
ws.write(email_file + ' ' + new Date() + " \n", 'utf8');
var http = require('http');
try {
var mail_server = http.createClient(3000, 'mail.example.com');
var request = mail_server.request('POST', '/services/1.0/rest/mail/', {host: 'mail.example.com'});
# This controller handles the login/logout function of the site.
class SessionsController < ApplicationController
# Be sure to include AuthenticationSystem in Application Controller instead
include AuthenticatedSystem
layout nil
# render new.rhtml
def new
end
def create