Skip to content

Instantly share code, notes, and snippets.

View fmeyer's full-sized avatar
👨‍💻
Grinding

Fernando Meyer fmeyer

👨‍💻
Grinding
View GitHub Profile
@zed9h
zed9h / exchange_cleanup.pl
Created July 17, 2009 04:07
connect imap server to clenaup unwanted emails
#!/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)';
#!/usr/bin/env ruby
require 'net/imap'
require 'rubygems'
require 'tmail'
# Introduction:
#
# This small library is to archive emails from an imap server
@pedroteixeira
pedroteixeira / hash.rb
Created March 18, 2012 18:11
hash syntax
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
@urubatan
urubatan / remove_dups.rb
Created May 24, 2012 14:42
Ruby script to remove duplicated files, I created it when migrating my pictures collection from iPhoto to picasa, and merged some independent collections, it created a real mess, and the result of this big mess is this gist.
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|
@dcrec1
dcrec1 / centos
Last active March 24, 2017 11:52
ubuntu/centos nginx
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
# 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.
#
(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
@zilti
zilti / base-stuff.el
Created July 25, 2013 19:54
Configuration for Emacs with Clojure; See [the full article](https://coderwall.com/p/53bfpg) on coderwall.
;; 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
@cfenollosa
cfenollosa / email-deadlines.php
Last active April 24, 2018 18:17
Postpone your own email
#!/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!
@rafaelrosafu
rafaelrosafu / 01_podcasts_august_2015.md
Last active October 10, 2018 19:02
Podcast list as of August 11th 2014. Just to be clear, most podcasts on this list don't have new episodes every week, some are almost gone.