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 run-at-home () | |
(interactive) | |
(string-match "192" (shell-command-to-string | |
"/sbin/ifconfig -a|awk '/inet /'"))) | |
(defun run-on-inside () | |
(interactive) |
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
import XMonad | |
import qualified XMonad.StackSet as SS | |
import qualified XMonad.Layout as L | |
import qualified XMonad.Util.CustomKeys as C | |
import qualified XMonad.Actions.Warp as W | |
import qualified Data.Map as M | |
main :: IO () | |
main = xmonad $ defaultConfig | |
{ borderWidth = 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 'w3m-search) | |
(eval-after-load "w3m-search" | |
'(progn | |
(add-to-list 'w3m-search-engine-alist | |
'("quote" | |
"http://finance.google.com/finance?q=%s" | |
nil)) | |
(add-to-list 'w3m-search-engine-alist | |
'("ports" | |
"http://www.freebsd.org/cgi/ports.cgi?query=%s" |
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 'smtpmail) | |
(require 'pgg) | |
;; ------------------------------------------------------------- | |
;; location awareness | |
(if (run-at-home) | |
(setq user-mail-address "REDACTED") | |
(setq user-mail-address "REDACTED")) | |
;; ------------------------------------------------------------- |
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
export HISTFILE=~/.histfile | |
export HISTSIZE=1000 | |
export SAVEHIST=1000 | |
bindkey -e | |
zstyle :compinstall filename "$HOME/.zshrc" | |
autoload -Uz compinit | |
compinit | |
PS1="$ " | |
export PATH="" |
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
{-# OPTIONS -fexcess-precision -fvia-C -fbang-patterns | |
-optc-O2 -optc-mfpmath=sse -optc-msse2 -optc-march=pentium4 #-} | |
module Main where | |
import System.Time | |
-- in the spirit of http://www.timestretch.com/FractalBenchmark.html | |
m :: Double -> Double -> Integer | |
m x y = f 0.0 0.0 (y - 0.5) x 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
{- | |
this is a trivial script to tell us when a freebsd port has been updated | |
within the last N days, where N is the argument provided to the script on the | |
command line. | |
this code is licensed under a "bsd" license, which is stated below | |
Copyright (c) 2007, Brad Clawsie. All rights reserved. | |
http://b7j0c.org/stuff/license.txt |
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
{- | |
this code is licensed under a "bsd" license, which is stated below | |
Copyright (c) 2007, Brad Clawsie. All rights reserved. | |
http://b7j0c.org/stuff/license.txt | |
-} | |
{-# LANGUAGE Arrows, NoMonomorphismRestriction #-} |
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/python | |
import imaplib | |
M = imaplib.IMAP4_SSL('imap.gmail.com') | |
if (M.login('[email protected]','PASSWORD')[0] != 'OK'): exit("no conn") | |
c = (M.select('Inbox'))[1][0] | |
if (c != '0'):print c | |
M.shutdown() |
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 perl | |
use Net::IMAP::Simple::SSL; | |
$| = 1; | |
my $server = 'imap.gmail.com'; | |
my $user = '[email protected]'; | |
my $pass = 'PASSWORD'; | |
my $imap = Net::IMAP::Simple::SSL->new($server); | |
$imap->login($user => $pass) || die "cannot connect"; | |
my $messages = $imap->select('Inbox'); | |
my $count = 0; |
OlderNewer