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_GHC -fcontext-stack=32 #-} | |
import XMonad hiding ( (|||) ) | |
import qualified XMonad.StackSet as W | |
import Control.OldException(catchDyn,try) | |
import Data.Char (toLower) | |
import Data.List (intercalate, intersperse, isSuffixOf, isPrefixOf) | |
import qualified Data.Map as M (fromList) |
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
# ....other stuff here | |
paginate: 10 |
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
if [[ -z $1 ]]; then | |
echo "A post title is required. Bye.." | |
exit 1 | |
fi | |
_post=$(echo $1 | tr ' ' '-') | |
_date=$(date +'%Y-%m-%d') | |
_datetime=$(date +'%Y-%m-%d %H:%M:%S') | |
_title="${_date}-${_post}.markdown" | |
_cwd=$(pwd) |
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
for f in *; do id3v2 --TPE2 "Various Artists" "${f}"; done |
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
$ convert -quality 80 fig.png fig.jpg | |
I find a quality factor of 80 on high resolution images gives good compresssion without too much loss in quality. You can then to convert the image to eps using "convert" with the eps2 settings: | |
$ convert fig.jpg eps2:fig.eps | |
If you can use level 3 postscript, you can convert directly from png to eps: | |
$ convert fig.png eps3:fig.eps |
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
redshift -l 37.993854:23.829346 -o -v -g 1:0.1:0.1 -t 1000:1000 -b 0.5 |
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
; Global settings | |
[redshift] | |
temp-day=5700 | |
temp-night=3500 | |
transition=1 | |
gamma=0.8:0.7:0.8 | |
location-provider=manual | |
adjustment-method=vidmode | |
; The location provider and adjustment method settings |
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
def unique(l): | |
s = set(); n = 0 | |
for x in l: | |
if x not in s: s.add(x); l[n] = x; n += 1 | |
del l[n:] | |
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
#!/bin/sh | |
# Tunnel imap connection through your server | |
_server="your-server-here" | |
_port="your-server-port-here" | |
_username="your-server-login-name" | |
# tunnel gmail imap (imap.gmail.com:993) <-> (localhost:10993) | |
ssh -f -N -L localhost:10993:imap.gmail.com:993 -p ${_port} -l ${_username} ${_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
find -L -maxdepth 1 -type l -delete |
OlderNewer