Skip to content

Instantly share code, notes, and snippets.

@victoredwardocallaghan
victoredwardocallaghan / gist:4646982
Created January 27, 2013 06:33
bitmap icon path support idea.
diff --git a/src/Config.hs b/src/Config.hs
index 6ab3f8d..9449250 100644
--- a/src/Config.hs
+++ b/src/Config.hs
@@ -52,6 +52,7 @@ import Plugins.DateZone
-- | The configuration data type
data Config =
Config { font :: String -- ^ Font
+ , bitMaps :: String -- ^ Bitmap file path
, bgColor :: String -- ^ Backgroud color
@victoredwardocallaghan
victoredwardocallaghan / gist:4653902
Created January 28, 2013 08:28
Haskell X11 - add XReadBitmapFile API patch.
diff --git a/Graphics/X11/Xlib/Misc.hsc b/Graphics/X11/Xlib/Misc.hsc
index 4074b49..f68fd2f 100644
--- a/Graphics/X11/Xlib/Misc.hsc
+++ b/Graphics/X11/Xlib/Misc.hsc
@@ -84,6 +84,7 @@ module Graphics.X11.Xlib.Misc(
bitmapBitOrder,
bitmapUnit,
bitmapPad,
+ readBitmapFile,
@victoredwardocallaghan
victoredwardocallaghan / gist:4706154
Created February 4, 2013 11:04
XReadBitmapFile fix binding types?
diff --git a/Graphics/X11/Xlib/Misc.hsc b/Graphics/X11/Xlib/Misc.hsc
index a4b75a0..fde4e7a 100644
--- a/Graphics/X11/Xlib/Misc.hsc
+++ b/Graphics/X11/Xlib/Misc.hsc
@@ -781,13 +781,13 @@ readBitmapFile display d filename =
m_y_hot | y_hot == -1 = Nothing
| otherwise = Just y_hot
case rv of
- 0 -> return $ Right (fromIntegral width, fromIntegral height, bitmap, m_x_hot, m_y_hot)
+ 0 -> return $ Right (width, height, bitmap, m_x_hot, m_y_hot)
@victoredwardocallaghan
victoredwardocallaghan / 001-ath9k-hang.patch
Created April 3, 2013 05:55
ath9k possible fix for FS#34569 - [linux] 3.7.x - 3.8.x ath wifi driver locks up some machines.
diff --git a/drivers/net/wireless/ath/ath9k/link.c b/drivers/net/wireless/ath/ath9k/link.c
index ade3afb..92fae7d 100644
--- a/drivers/net/wireless/ath/ath9k/link.c
+++ b/drivers/net/wireless/ath/ath9k/link.c
@@ -132,6 +132,8 @@ void ath_hw_pll_work(struct work_struct *work)
u32 pll_sqsum;
struct ath_softc *sc = container_of(work, struct ath_softc,
hw_pll_work.work);
+
+ ath9k_ps_wakeup(sc);
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 76da544..70ef7e4 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -779,7 +779,7 @@ u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah)
if (WARN_ON_ONCE(i >= 100)) {
ath_err(common, "PLL4 measurement not done\n");
- break;
+ return;
[INFO ] =================================================================
[INFO ] Installing D.U.M.A.
[ERROR] duma.c:58:20: fatal error: memory.h: No such file or directory
[ERROR] make[1]: *** [duma.o] Error 1
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Installing D.U.M.A.'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@257]
@victoredwardocallaghan
victoredwardocallaghan / cg{config,rules}.conf
Last active December 24, 2015 00:19
cgroup browers since they suck, literally! # systemctl enable cgrules.service cgconfig.service # systemctl start cgrules.service cgconfig.service
# /etc/cgconfig.conf
####################
# Prevent Web Browsers from taking all memory
# $ cgexec -g memory,cpuset:browser /usr/bin/firefox
#
group browser {
perm {
# who can manage limits
admin {
data ZpoolCMD = Status | Clear
zpoolExec :: ZpoolCMD -> String
zpoolExec cmd =
case cmd of
--Status -> (return $ zpoolStatus)
Clear -> zpoolClear
_ -> "... uh... something else"
zpoolStatus :: IO String
{-# LANGUAGE OverloadedStrings #-}
module POSIX where
-- This attoparsec module is intended for parsing text that is
-- -- represented using an 8-bit character set, e.g. ASCII or ISO-8859-15.
--import Data.Attoparsec.Char8
import Data.Text
import Data.Attoparsec.Text
import Control.Applicative
--
-- apsh(1) interpreter specification in LBNF notation.
----------------------------------
-- The core statement language. --
----------------------------------
Prog. Program ::= [Function] ;
Fun. Function ::= Stm Exp Block ;