Skip to content

Instantly share code, notes, and snippets.

@chemist
chemist / ghci
Created May 27, 2013 13:39
ghci config for search and doc
:set prompt " >>> "
let ghciEscapeShellArg arg = "'" ++ concatMap (\x -> if x == '\'' then "'\"'\"'" else [x]) arg ++ "'"
:def! search return . (":! hoogle --color --count=20 " ++) . ghciEscapeShellArg
:def! doc return . (":! hoogle --info " ++) . ghciEscapeShellArg
#!/bin/bash
# URL = http://mac.pcbeta.com/viewthread.php?tid=118050&extra=
# run: sudo ./pd8_trialreset.sh
rm -rfd /Library/Preferences/Parallels
rm -rfd ~/Library/Preferences/Parallels
rm -rfd /private/var/.Parallels_swap
rm -rfd ~/Library/Preferences/com.parallels*
rm -rfd /private/var/db/Parallels
@chemist
chemist / gist:3766652
Created September 22, 2012 16:21 — forked from HasAndries/gist:3135128
angularjs directive for bootstrap datepicker : eternicode/bootstrap-datepicker, eyecon.ro
angular.module('bDatepicker', []).
directive('bDatepicker', function(){
return {
require: '?ngModel',
restrict: 'A',
link: function($scope, element, attrs, controller) {
var updateModel;
updateModel = function(ev) {
element.datepicker('hide');
element.blur();
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable, StandaloneDeriving #-}
module CloudTest where
import Remote
import Control.Applicative
import Control.Monad
import Control.Monad.Trans
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable, StandaloneDeriving, NamedFieldPuns #-}
module CloudTest where
import Remote
import Remote.Call
import Control.Applicative
import Control.Monad
import Control.Monad.Trans