Skip to content

Instantly share code, notes, and snippets.

View market-prices.hs
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# OPTIONS_GHC -Wall #-}
-- This script fetches prices of commodities like funds, etfs, stocks and
-- currencies by scraping a webpage and prints it in hledger compatible format.
module Main where
@maralorn
maralorn / ReflexUtils.hs
Created May 23, 2020
A try at efficient reflex list widgets
View ReflexUtils.hs
( smartSimpleList
, smartMapList
, getCachedDynamic
)
where
import qualified Reflex as R
import qualified Reflex.Dom as D
import qualified Data.Patch.MapWithMove as Patch
import qualified Data.Patch.Map as Patch
View email2matrix-service.nix
{ pkgs, config, ... }:
let
email2matrix = pkgs.callPackage ./email2matrix.nix {};
default_mailbox = {
MailboxName = "<missing>";
MatrixRoomId = "<missing>";
MatrixHomeserverUrl = "https://matrix.maralorn.de";
MatrixUserId = "@marabot:matrix.maralorn.de";
MatrixAccessToken = config.m-0.private.matrix_marabot_token;
IgnoreSubject = false;
View gist:3fc7326ef2e85c6c499f91abab1b79ed
running install_scripts
Traceback (most recent call last):
File "nix_run_setup.py", line 8, in <module>
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
File "setup.py", line 18, in <module>
license='MIT')
File "/nix/store/1cmq5nwr6gp51jp1bsq647sqcb3dc3zy-python3-3.5.3/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/nix/store/1cmq5nwr6gp51jp1bsq647sqcb3dc3zy-python3-3.5.3/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
@maralorn
maralorn / bup compile error
Last active Dec 16, 2015
bup compile error seems to be caused by: http://bugs.python.org/issue17547
View bup compile error
gcc -pthread -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wall -O2 -Werror -fPIC -I/usr/include/python2.7 -c _helpers.c -o build/temp.linux-x86_64-2.7/_helpers.o
In file included from /usr/include/python2.7/Python.h:126:0,
from _helpers.c:6:
/usr/include/python2.7/modsupport.h:27:1: Fehler: »_PyArg_ParseTuple_SizeT« ist ein nicht erkannter Formatfunktionstyp [-Werror=format=]
PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...) Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3);
^
cc1: Alle Warnungen werden als Fehler behandelt
error: command 'gcc' failed with exit status 1
make: *** [lib/bup/_helpers.so] Fehler 1
View handler.sh
#!/bin/sh
set $*
export DISPLAY=:0.0
export XAUTHORITY=/home/maralorn/.Xauthority
case "$1" in
ibm/hotkey)
case "$4" in
0000500b)
View test._coffee
class Test
constructor: (_) ->
method: (_) =>
console.log 'method'
test = new Test _
test.method _
console.log 'ready'
###