Skip to content

Instantly share code, notes, and snippets.

@Ou42
Ou42 / xmonad.hs
Created March 29, 2023 13:15
xmonad complains when multiple layouts are defined ...
$ xmonad --recompile
XMonad will use stack ghc --stack-yaml "/home/me/.config/xmonad/stack.yaml" to recompile.
XMonad recompiling (forced).
Errors detected while compiling xmonad config: /home/me/.config/xmonad/xmonad.hs
$ stack build --silent --stack-yaml /home/me/.config/xmonad/stack.yaml
$ stack ghc --stack-yaml /home/me/.config/xmonad/stack.yaml -- --make xmonad.hs -i -ilib -fforce-recomp -main-is main -v0 -outputdir /home/me/.cache/xmonad/build-x86_64-linux -o /home/me/.cache/xmonad/xmonad-x86_64-linux
xmonad.hs:15:16: error:
• Couldn't match expected type ‘XMonad.Layout.Decoration.DefaultShrinker
-> Theme -> t1’
@Ou42
Ou42 / setup.md
Created January 27, 2023 19:30
Dev Setup on Native Linux Install - 2023-01-26

Native Linux Setup - 2023-01-26

Git setup

  • set user.name
    • $ git config --global user.name "----"
  • set user.email
    • $ git config --global user.email "----"
  • set init.defaultbranch
  • $ git config --global init.defaultbranch main
@Ou42
Ou42 / Speller.hs
Created September 27, 2019 23:05
FutureLearn: Functional Programming in Haskell - Speller
{-
2019-09-27
Write a Spelling Book Generator
. Are you familiar with children’s alphabetical spelling books?
They say things like: a is for apple, b is for baby, and c is for cat
. Now that you know about Haskell list functions, you can develop a function
to generate the text for a spelling book, given a list of words.
@Ou42
Ou42 / adb-logcat-android_4.4.2
Created February 17, 2017 21:25
kivy - buildozer - plyer - accelerometer - android 4.4.2 & android 6.0.1
>adb logcat python:D *:S *:F
--------- beginning of /dev/log/main
--------- beginning of /dev/log/system
I/python (14998): Initialize Python for Android
I/python (14998): Changing directory to the one provided by ANDROID_ARGUMENT
I/python (14998): /data/data/org.test.vmaccel/files/app
I/python (14998): Preparing to initialize python
I/python (14998): crystax_python does not exist
I/python (14998): Initialized python
I/python (14998): AND: Init threads
>>> import kivent_core
[INFO ] [OSC ] using <thread> for socket
[INFO ] [Window ] Provider: sdl2
[CRITICAL ] [Window ] Unable to find any valuable Window provider at all!
sdl2 - ImportError: DLL load failed: The specified procedure could not be found.
File "C:\Python27\lib\site-packages\kivy\core\__init__.py", line 67, in core_select_lib
cls = cls()
File "C:\Python27\lib\site-packages\kivy\core\window\window_sdl2.py", line 138, in __init__
super(WindowSDL, self).__init__()
File "C:\Python27\lib\site-packages\kivy\core\window\__init__.py", line 719, in __init__
@Ou42
Ou42 / count-down.py
Created February 8, 2017 10:14
kivy count down animation WIP
'''
count down 3-2-1 w/ fade out to full transparency
'''
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.label import Label
from kivy.properties import NumericProperty
from kivy.animation import Animation
@Ou42
Ou42 / buildozer.spec
Last active February 8, 2017 06:25
adb logcat output - v41 - kivy, buildozer, plyer -> attempting to get it working on android 6
[app]
# (str) Title of your application
title = VMflash
# VMflash
# (str) Package name
package.name = vmflash
# vmflash