Skip to content

Instantly share code, notes, and snippets.

require "time"
require "date"
class Date
def to_time
Time.local(year, month, day)
end
end
class Time
@xxxazxxx
xxxazxxx / dart.txt
Created November 12, 2013 19:21 — forked from paulmillr/dart.md
---------- Forwarded message ----------
From: Mark S. Miller <[email protected]>
Date: Tue, Nov 16, 2010 at 3:44 PM
Subject: "Future of Javascript" doc from our internal "JavaScript Summit"
last week
To: [email protected]
On November 10th and 11th, a number of Google teams representing a variety
of viewpoints on client-side languages met to agree on a common vision for
the future of Javascript.
#!/usr/bin/env ruby
require 'json'
r = ''
for line in DATA
line.gsub!(/^(\s*"[^=]+":\s*")(.*?)(",\s*)$/) {
b, m, a = $~.captures
"#{b}#{m.gsub('"', '\\"')}#{a}"
}

Build your own private, encrypted, open-source Dropbox-esque sync folder

Prerequisites:

  • One or more clients running a UNIX-like OS. Examples are given for Ubuntu 12.04 LTS, although all software components are available for other platforms as well (e.g. OS X). YMMV
  • A cheap Ubuntu 12.04 VPS with storage. I recommend Backupsy, they offer 250GB storage for $5/month. Ask Google for coupon codes.

Software components used:

  • Unison for file synchronization
  • EncFS for folder encryption