Skip to content

Instantly share code, notes, and snippets.

@rdesfo
rdesfo / ghcjsdomwebkitgtk3.txt
Last active August 29, 2015 14:03
ghcjs-dom webkitgtk3
(https://pay.reddit.com/r/haskell/comments/29lapx/hplayground_write_haskell_code_for_the_browser/)
[–]hamishmack 2 points 3 days ago*
WebKitGtk includes C functions for manipulating the DOM and these are included in the webkitgtk3 Haskell package. It also supports adding callbacks to Haskell for DOM events.
To try it out just you should be able to run something like
sudo apt-get install libwebkitgtk-3.0-dev
cabal install gtk2hs-buildtools
@rdesfo
rdesfo / gist:8506428
Last active January 3, 2016 19:09
grub2 nixOS
menuentry "NixOS 13.10.35511.dd717f2 Installer" {
set root='(hd0,msdos1)'
linux /boot/nixos-livecd-bzImage init=/nix/store/fciz0cbs38vd7z7g0rwvzdnjmkbflb9b-nixos-13.10.35511.dd717f2/init root=/dev/sda1 loglevel=4
initrd /boot/nixos-livecd-initrd
}
@rdesfo
rdesfo / krunner.desktop
Created August 7, 2013 07:46
disable krunner ~/.kde4/share/autostart/krunner.desktop
[Desktop Entry]
Exec=krunner
Hidden=true
X-DBUS-StartupType=none
Name=Command Runner
Type=Service
X-KDE-StartupNotify=false
OnlyShowIn=KDE;
X-KDE-autostart-phase=1
@rdesfo
rdesfo / Disable_Nepomuk_n_Akonadi.md
Created August 6, 2013 23:45
Disable Nepomuk & Akonadi

Nepomuk

Open ~/.kde/share/config/nepomukserverrc and set “Start Nepomuk” to false.

[Basic Settings]
Start Nepomuk=false

Open ~/.kde/share/config/kdedrc and set “autoload” to false for nepomuksearchmodule:

[Module-nepomuksearchmodule]

@rdesfo
rdesfo / intel_ips.txt
Created August 3, 2013 19:25
intel ips 0000:00:1f.6: ME failed to update for more than 1s, likely hung
There is a work around
1. add intel_ips to the blacklist
blacklist intel_ips ==> to /etc/modprobe.d/blacklist.conf
2. add i915 and intel_ips to /etc/modules
i915/nintel_ips ==> to /etc/modules
http://crunchbang.org/forums/viewtopic.php?id=26105
@rdesfo
rdesfo / gist:6140379
Created August 2, 2013 14:41
pandoc error
pandoc: error while loading shared libraries: libbibutils.so.2: cannot open shared object file: No such file or directory
@rdesfo
rdesfo / gist:5625466
Created May 22, 2013 05:40
How to start working on GHC?
Download the GHC sources (git clone ...)
Run sync-all get. Presumably, this is a script to run multiple git commands for different repositories, as GHC consists of multiple ones.
Change whatever files I want changed.
Compile, run testsuite.
Commit, then somehow issue a pull request.
http://www.reddit.com/r/haskell/comments/1efw5l/how_to_start_working_on_ghc/
@rdesfo
rdesfo / gist:5625451
Created May 22, 2013 05:35
git recap
Recap
1. Initialize
$ git init
2. Add Changes
$ git add .
3. Committing a change
$ git commit -m "Some message"
Typically the monadic IO goes like this:
RunReset
main :: IO ()
main = putStrLn =<< getContents
@rdesfo
rdesfo / HappstackHeist.hs
Created May 7, 2013 16:38
happstack heist example
module Main where
import Control.Applicative ((<$>))
import Control.Monad (msum)
import qualified Data.Text as T
import Happstack.Server (dir, nullConf, nullDir, simpleHTTP, seeOther, toResponse)
import Happstack.Server.Heist (heistServe, initHeistCompiled)
import Heist (getParamNode)
import Heist.Compiled (Splice, yieldRuntimeText)
import qualified Text.XmlHtml as X