This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Net::IMAP::Simple; | |
use Encode qw/encode decode/; | |
my $host = 'imap.server.com' | |
my $login = 'carlo.caputo'; | |
my $password = '123456'; | |
my $delete_pattern = 'Undeliverable: (maillist|useless|automatic)'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'net/imap' | |
require 'rubygems' | |
require 'tmail' | |
# Introduction: | |
# | |
# This small library is to archive emails from an imap server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Hash | |
def id | |
self["id"] || self[:id] | |
end | |
def type | |
self["type"] || self[:type] || self.type | |
end | |
def method_missing(meth, *args, &block) | |
if args.size == 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'digest/sha1' | |
require 'fileutils' | |
directories = [ | |
"SOURCE DIR 1", | |
"SOURCE DIR 2" | |
] | |
files = {} | |
directories.each do |dir_name| | |
puts "Scanning Directory: #{dir_name} " | |
Dir.glob("#{dir_name}/**/*.*") do |file_name| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /tmp | |
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm | |
rpm -Uhv rpmforge-release*.rf.i386.rpm | |
yum install readline-dev htop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Exports all .org files in argument dirs as HTML. | |
# | |
# Usage: rake -f export-org-dirs.rb DIR+ [sync_mobile] | |
# | |
# sync_mobile (if not a dir) will fire off org-mobile-push and -pull if the | |
# mobile index is out of date wrt org files in dirs. This happens in the | |
# server so it saves your work and updates locally instead of behind your back | |
# and demanding a revert. It is advised to set this up to run only when the | |
# computer is idle so it doesn't go crazy while you're editing. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun dotspacemacs/layers () | |
(setq-default | |
dotspacemacs-configuration-layer-path '() | |
dotspacemacs-delete-orphan-packages t | |
dotspacemacs-distribution 'spacemacs | |
dotspacemacs-configuration-layers | |
`((auto-completion :variables | |
auto-completion-return-key-behavior nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Highlights line you're currently on | |
(global-hl-line-mode t) | |
;; Shows in modeline where in the file you are | |
(sml-modeline-mode) | |
;; Pretty symbols | |
(require 'pretty-mode-plus) | |
(global-pretty-mode 1) | |
;; Autocomplete | |
(require 'auto-complete) | |
;; Disable annoying bell sound |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
// Script to postpone your own email. Parses IMAP folders and moves emails to a folder named "Today" | |
// Run this from a crontab, for example at 6 AM | |
// BSD License | |
// (C) Carlos Fenollosa, 2011-2016 | |
// Read more about this script: http://cfenollosa.com/blog/a-simple-script-to-postpone-your-own-email.html | |
// Please leave comments and feedback for bugs and ideas! |
OlderNewer