Skip to content

Instantly share code, notes, and snippets.

{-# 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 02:22
A try at efficient reflex list widgets
( 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
{ 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;
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 December 16, 2015 15:19
bup compile error seems to be caused by: http://bugs.python.org/issue17547
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
#!/bin/sh
set $*
export DISPLAY=:0.0
export XAUTHORITY=/home/maralorn/.Xauthority
case "$1" in
ibm/hotkey)
case "$4" in
0000500b)
class Test
constructor: (_) ->
method: (_) =>
console.log 'method'
test = new Test _
test.method _
console.log 'ready'
###