Skip to content

Instantly share code, notes, and snippets.

;; Simple interactive work tracker similar to timeclock.el.
;;
;; Chris Done 2009, Public domain
;;
;; Suggested setup:
;; ;; Work tracker
;; (require 'worktracker)
;; ;;; Clock into project
;; (global-set-key [f9] 'work-clockin)
;; ;;; Clock out of project (done)
;; Align the import lines in a Haskell file.
;; Copyright (C) 2010 Chris Done <[email protected]>
;; This module is intended for Haskell mode users, but is
;; independent of Haskell mode.
;; Example usage:
;; (require 'haskell-align-imports)
;; (define-key haskell-mode-map (kbd "C-c ." 'haskell-align-imports)
if exists('b:did_my_haskell_plugin')
finish
endif
let b:did_my_haskell_plugin = 1
so <sfile>:h/program.vim
setl isk+=' et sts=4 sw=4
setl nospell
hsdns: ADNS
hsdns: ADNS.Base
hsdns: ADNS.Endian
hsdns: ADNS.Resolver
cv-combinators: AI.CV.ImageProcessors
HOpenCV: AI.CV.OpenCV.CV
HOpenCV: AI.CV.OpenCV.CxCore
HOpenCV: AI.CV.OpenCV.HighGui
HOpenCV: AI.CV.OpenCV.Types
hnn: AI.HNN.Layer
;; A function for cycling through Haskell import lists.
;; Copyright (C) 2010 Chris Done <[email protected]>
;; The cycling step will stop once at the last import list so
;; that it is easy to add a new import list.
;; This module works completely independently of any libraries
;; (including haskell-mode).
;; Exports three interactive functions:
;; A function for observing the currently installed Haskell
;; packages.
;; Copyright (C) 2010 Chris Done <[email protected]>
;; This module is intended for Elisp programmers to use in other
;; packages that involve inspecting the currently installed
;; packages and modules.
;; Example usage:
;;
{-# OPTIONS -Wall #-}
module Main where
import Network
import System.Console.CmdArgs
import System.Posix
import Hulk.Config (getConfig)
import Hulk.Options (options,optionsConf)
import Hulk.Server (start)
@chrisdone
chrisdone / gist:834608
Created February 18, 2011 23:36
replace method calls with shorter ones
import Data.Char
import Data.List
import Control.Monad.State
import qualified Data.Map as M
data Token = Str Char String
| Code String
deriving Show
main = interact horrify
@chrisdone
chrisdone / gist:834935
Created February 19, 2011 08:45
javascript method squish
import Data.Ord
import Data.Char
import Data.List
import Control.Monad.State
import qualified Data.Map as M
data Token = Str Char String
| Code String
deriving Show
module Language.Lisk.Parser2 where
------------------------------------------------------------------------------
-- S-expression parser (Lisk tokenizer)
--
import Control.Applicative
import Text.Parsec hiding ((<|>),many,token,optional,spaces)
import Text.Parsec.Combinator hiding (optional)