- Install getmail (aptitude install getmail4)
- Set Up Your Imap Server (tl;dr)
- getmail
ruby date_based_archive.rb ~/Maildir/.Archive
# coding: utf-8 | |
# | |
# Encode any codepoint outside the ASCII printable range to an HTML character | |
# reference (https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_reference_overview). | |
def encode(string) | |
string.each_codepoint.inject("") do |buffer, cp| | |
cp = "&#x#{cp.to_s(16)};" unless cp >= 0x20 && cp <= 0x7E | |
buffer << cp | |
end | |
end |
digraph G { | |
ranksep=1.0; | |
ratio=0.6; | |
APL [color=Blue, shape=box]; | |
Simula [color=Blue, shape=box]; | |
LISP [color=Blue, shape=box]; | |
ALGOL [color=Blue, shape=box]; | |
Planner [color=Blue, shape=box]; | |
ACTOR [shape=hexagon]; |
# Don't use this. | |
import zmq | |
import os | |
class Worker: | |
def __init__(self): | |
print "parent: %d, pid: %d" % (os.getppid(), os.getpid()) | |
self.pid = os.getppid() | |
self.context = zmq.Context() | |
self.sub = self.context.socket(zmq.SUB) |
#!/bin/bash | |
for filename in `ls /Users/psionides/Dropbox/dotfiles`; do | |
name=`basename $filename .txt` | |
echo "Linking /Users/psionides/Dropbox/dotfiles/$filename to /Users/psionides/.$name..." | |
rm -f /Users/psionides/.$name | |
ln -s /Users/psionides/Dropbox/dotfiles/$filename /Users/psionides/.$name | |
done | |
echo "Done." |
How would you like to replace me as The Guardian's Digital Operations Manager?
This is an exciting role where you'll be challenged in many different ways. Here is the mission should you choose to accept it:
- Do whatever it takes to keep serving >400,000,000 pages a month
- Perform capacity planning - our traffic grew over 20% over last year
- Manage incidents - we're optimising on MTTR not MTBF
- Help lead us down the road of Continuous Delivery - We're not quite Etsy, but we did 37 releases last month and are getting faster
If you want to know more, please view the job spec (coming soon on Guardian Jobs) and contact me at [email protected]
sasha:rubinius brian$ bin/mspec -t /source/mruby/bin/mruby | |
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32] | |
NODE_SCOPE: | |
local variables: | |
NODE_BEGIN: | |
NODE_CALL: | |
NODE_GVAR $: | |
method='unshift' (141) | |
args: | |
NODE_CALL: |
It's become increasingly apparent that between my full-time job and my work on Sass, I don't have the cycles any more to properly maintain Haml. I'd like to pass on the mantle to someone else, but I don't want to do it blindly.
If you're interested in becoming the maintainer of Haml, please demonstrate this by creating a fork of the repo and starting the maintenance process of addressing the issues and code-reviewing and merging pull requests into your fork. What I'm looking for is evidence that you'll be more diligent than I currently can, as well as the ability to both write good code and get good code from other contributors.
In a week or so, if anyone's taken up this challenge and done well, I'll hand them the reins.
- Nathan Weizenbaum, Haml maintainer
module Instruments | |
def self.set_logger(l, m) | |
@logger = l | |
@method = m | |
end | |
def self.logger | |
@logger | |
end |
class Register < Struct.new(:name) | |
BASIC = %w[A B C X Y Z I J].map(&:to_sym) | |
SPECIAL = %w[POP PEEK PUSH SP PC O].map(&:to_sym) | |
ALL = BASIC + SPECIAL | |
attr_accessor :plus | |
def value | |
case name | |
when *BASIC |