Skip to content

Instantly share code, notes, and snippets.

View eccstartup's full-sized avatar
🈲
I may be slow to respond.

Yi Lu eccstartup

🈲
I may be slow to respond.
View GitHub Profile
@eccstartup
eccstartup / lyah-theme.el
Created September 25, 2013 13:10
A similar theme for emacs as LYAH.
(deftheme lyah
"Created 2013-09-25.")
(custom-theme-set-faces
'lyah
'(cursor ((t (:background "White"))))
'(fixed-pitch ((t (:family "Monospace"))))
'(variable-pitch ((t (:family "Sans Serif"))))
'(escape-glyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown"))))
'(minibuffer-prompt ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "medium blue"))))
@eccstartup
eccstartup / exclude
Created September 30, 2013 11:43
my git ignore settings
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
*.o
*~
*.hi
dist*
ghc -O2 -ddump-simpl -dsuppress-idinfo -dsuppress-coercions -dsuppress-type-applications -dsuppress-uniques -dsuppress-module-prefixes Main.hs
@eccstartup
eccstartup / hackage-lftp.sh
Created October 13, 2013 01:43
Use lftp to create a local hackage mirror.[OUTDATED]
#!/bin/bash
cd /path/to/mirror/hackage
lftp -e "mirror -c --parallel=10 http://old.hackage.haskell.org/packages"
@eccstartup
eccstartup / error-cabal-build-gtk.txt
Created October 18, 2013 03:13
cabal build on gtk
Building gtk3-0.12.4.1...
Preprocessing library gtk3-0.12.4.1...
[ 1 of 198] Compiling Graphics.UI.Gtk.ModelView.Sequence ( Graphics/UI/Gtk/ModelView/Sequence.hs, dist/build/Graphics/UI/Gtk/ModelView/Sequence.o )
[ 2 of 198] Compiling Graphics.UI.Gtk.Gdk.Enums ( dist/build/Graphics/UI/Gtk/Gdk/Enums.hs, dist/build/Graphics/UI/Gtk/Gdk/Enums.o )
[ 3 of 198] Compiling Graphics.UI.Gtk.General.Enums ( dist/build/Graphics/UI/Gtk/General/Enums.hs, dist/build/Graphics/UI/Gtk/General/Enums.o )
[ 4 of 198] Compiling Graphics.UI.Gtk.General.Threading ( Graphics/UI/Gtk/General/Threading.hs, dist/build/Graphics/UI/Gtk/General/Threading.o )
[ 5 of 198] Compiling Graphics.UI.Gtk.Signals ( dist/build/Graphics/UI/Gtk/Signals.hs, dist/build/Graphics/UI/Gtk/Signals.o )
[ 6 of 198] Compiling Graphics.UI.Gtk.Types ( dist/build/Graphics/UI/Gtk/Types.hs, dist/build/Graphics/UI/Gtk/Types.o )
Graphics/UI/Gtk/Types.chs:762:27: Warning:
@eccstartup
eccstartup / error
Created November 11, 2013 02:34
install error of threads-0.5.0.2
Configuring threads-0.5.0.2...
Building threads-0.5.0.2...
Preprocessing library threads-0.5.0.2...
Control/Concurrent/Thread.hs:129:30:
warning: \u used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
doForkWithUnmask $ \unmask →
^
Control/Concurrent/Thread.hs:139:12:
@eccstartup
eccstartup / .emacs
Created November 12, 2013 02:46
my .emacs file
(require 'package)
(add-to-list 'package-archives
'("marmalade" .
"http://marmalade-repo.org/packages/"))
(package-initialize)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
@eccstartup
eccstartup / cabal install gtk
Created November 16, 2013 00:50
cabal error
Resolving dependencies...
Downloading gtk-0.12.4...
[1 of 2] Compiling SetupWrapper ( /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/gtk-0.12.4-2950/gtk-0.12.4/SetupWrapper.hs, /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/gtk-0.12.4-2950/gtk-0.12.4/dist/setup/SetupWrapper.o )
/var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/gtk-0.12.4-2950/gtk-0.12.4/SetupWrapper.hs:94:45:
Ambiguous occurrence `moreRecentFile'
It could refer to either `SetupWrapper.moreRecentFile',
defined at /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/gtk-0.12.4-2950/gtk-0.12.4/SetupWrapper.hs:149:1
or `Distribution.Simple.Utils.moreRecentFile',
imported from `Distribution.Simple.Utils' at /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/gtk-0.12.4-2950/gtk-0.12.4/SetupWrapper.hs:8:1-32
@eccstartup
eccstartup / error-install-gtk.md
Created December 3, 2013 05:16
cabal install gtk

#1. cabal install glib-0.12.5.0 Resolving dependencies... [1 of 2] Compiling SetupWrapper ( /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/glib-0.12.5.0-1494/glib-0.12.5.0/SetupWrapper.hs, /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/glib-0.12.5.0-1494/glib-0.12.5.0/dist/setup/SetupWrapper.o )

/var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/glib-0.12.5.0-1494/glib-0.12.5.0/SetupWrapper.hs:118:28: Warning: In the use of `configCompiler' (imported from Distribution.Simple.Configure): Deprecated: "'configCompiler' is deprecated. Use 'configCompilerEx' instead." [2 of 2] Compiling Main ( /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/glib-0.12.5.0-1494/glib-0.12.5.0/Setup.hs, /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/glib-0.12.5.0-1494/glib-0.12.5.0/dist/setup/Main.o ) Linking /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/glib-0.12.5.0-1494/glib-0.12.5.0/dist/setup/setup ...