Skip to content

Instantly share code, notes, and snippets.

@chrisdone
chrisdone / gist:dec52a5995290bab5d27
Created Sep 11, 2014
grooveshark broadcast tracks
View gist:dec52a5995290bab5d27
// ==UserScript==
// @name Grooveshark broadcast tracks
// @namespace chrisdone
// @description Grooveshark broadcast tracks
// @include http://grooveshark.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// @version 1
// @grant none
// ==/UserScript==
View Status.hs
-- Compile with
--
-- ghc --make Status.hs -o ~/.cabal/bin/projects -O2 -threaded
--
-- Or run with:
--
-- runhaskell Status.hs
--
import Control.Applicative
View SetupHsenv.hs
import Data.Conduit.Shell
import qualified Data.Conduit.Shell.Segments as SH
main =
run (do hsenv
cur:_ <- SH.strings latestStackage
sed ("s/remote-repo:.*/remote-repo: stackage:http:\\/\\/www.stackage.org\\/stackage\\/" ++
cur ++ "/")
".hsenv/cabal/config"
"-i"
View Keylogger.hs
-- Simple keylogger
--
-- Compile & install
--
-- ghc --make Keylog.hs -O2 -threaded -o xinput-keylogger
-- sudo mv xinput-keylogger /usr/local/bin
--
-- Storage (for security)
--
-- $ sudo useradd xinput
View gist:aa5826ed37c780c8f63d
foo = [Extender moduleHead,Extender exportList]
-- everything after is messed up
indentSpaces = putStrLn = "Hello!"
@chrisdone
chrisdone / kmacro-start-macro-resuming-recent.el
Last active Aug 29, 2015
Keyboard macros resumable after C-g
View kmacro-start-macro-resuming-recent.el
;;; kmacro.el --- Enhancement to kmacro recording.
;; Copyright (c) 2014 Chris Done. All rights reserved.
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This file is distributed in the hope that it will be useful,
View Github.hs
import Data.Conduit.Shell
import qualified Data.Conduit.Shell.Segments as SH
import System.Environment
main =
do args <- getArgs
case args of
[user] ->
do pos:_ <- run (SH.strings (posConduit user))
putStrLn pos
View worktracker.el
;; 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)
View haskell-align-imports.el
;; Align the import lines in a Haskell file.
;; Copyright (C) 2010 Chris Done <chrisdone@gmail.com>
;; 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)
View haskell-align-imports.vim
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
You can’t perform that action at this time.