Skip to content

Instantly share code, notes, and snippets.

@beny
beny / mail_notes.rb
Created July 20, 2012 15:16
simple script, which finds Notes from iOS app in my Gmail
require "net/imap"
require "mail"
=begin
SAMPLE zpravy
Subject: =?utf-8?Q?Kv=C4=9Btin=C3=A1=C5=99stv=C3=AD_D=C4=9Bl=C5=88=C3=A1k?=
From: =?utf-8?Q?Ondra_Bene=C5=A1?= <[email protected]>
X-Universally-Unique-Identifier: DDC4E35E-7D70-4E97-8167-011B204229D3
@jrom
jrom / nginx.conf
Created February 7, 2012 17:14
nginx hack for multiple conditions
if ($request_uri = /) {
set $test A;
}
if ($host ~* teambox.com) {
set $test "${test}B";
}
if ($http_cookie !~* "auth_token") {
set $test "${test}C";
@codiez
codiez / itunes_notifications.py
Created December 20, 2009 20:14
Listen for distributed notifications from iTunes of the current song
'''
This python script listens for distributed notifications from iTunes of new songs playing,
works alot better then constantly polling.
'''
import Foundation
from AppKit import *
from PyObjCTools import AppHelper
class GetSongs(NSObject):
def getMySongs_(self, song):