Skip to content

Instantly share code, notes, and snippets.

View mkohlhaas's full-sized avatar

Michael Kohlhaas mkohlhaas

View GitHub Profile
-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here
local map = vim.keymap.set
map("n", "j", "jzz")
map("n", "k", "kzz")
map("n", "n", "nzz")
map("n", "N", "Nzz")
# vim:fileencoding=utf-8:foldmethod=marker
#: Fonts {{{
#: kitty has very powerful font management. You can configure
#: individual font faces and even specify special fonts for particular
#: characters.
# font_family monospace
# bold_font auto
# Enable the subsequent settings only in interactive sessions
case $- in
*i*) ;;
*) return ;;
esac
# Path to your oh-my-bash installation.
export OSH='/home/schmidh/.oh-my-bash'
# Set name of the theme to load. Optionally, if you set this to "random"
@mkohlhaas
mkohlhaas / gist:85771d0d3a03ddaccd9d146108edc552
Last active December 1, 2023 18:02
FFI Playground Pharo
index := FFITutorial createIndex: 0 display: 0.
tu := FFITutorial parseTranslationUnit: 'tst.h' index: index
'tst.h' asFileReference absolutePath
'tst.h' asFileReference contents
"struct foo {
int bar;
int *bar_pointer;
};
@mkohlhaas
mkohlhaas / hamlet.txt
Created November 18, 2023 15:34
Word count in Pharo/Smalltalk
splitChars := {Character space . Character lf . $, . $. . $! . $? . $' . $: . $; . $- . $_ . $? . $! . $´}.
rawWords := 'hamlet.txt' asFileReference contents substrings: splitChars.
words := rawWords collect: [:word | word asLowercase trimBoth] thenSelect: [:word | word size > 3 ].
words asBag sortedCounts.
require 'fdb'
FDB.api_version 730
####################################
## Initialization ##
####################################
# Data model:
# ['attends', student, class] = ''
@mkohlhaas
mkohlhaas / gist:2251cb3e32ba0ac08af32e742582ec7a
Created October 20, 2023 00:34
raylib building and installation
# https://gitlab.archlinux.org/archlinux/packaging/packages/raylib/-/blob/main/PKGBUILD
git clone https://github.com/raysan5/raylib.git
cmake -B build -D BUILD_EXAMPLES=OFF -D BUILD_SHARED_LIBS=ON -D CMAKE_BUILD_TYPE=Release -D CMAKE_C_FLAGS="$CFLAGS -fPIC -w" -D CMAKE_INSTALL_LIBDIR=lib -D CMAKE_INSTALL_PREFIX=/usr -D OpenGL_GL_PREFERENCE=GLVND -D PLATFORM=Desktop -D USE_EXTERNAL_GLFW=OFF -D WITH_PIC=ON -G Ninja -S raylib -W no-dev
ninja -C build
sudo ninja -C build install
@mkohlhaas
mkohlhaas / gist:22fdcf05017e0ab834588bf327143673
Last active October 10, 2023 04:09
Install Android Emulator
sdkmanager --list
sdkmanager "system-images;android-34;google_apis;x86_64"
avdmanager create avd -n tst -k "system-images;android-34;google_apis;x86_64"
flutter emulators
flutter emulators --launch tst
flutter devices
flutter run -d emulator-5554
avdmanager list
avdmanager create avd -n galaxy -k "system-images;android-34;google_apis;x86_64" -d 1
let upstream =
https://github.com/purerl/package-sets/releases/download/erl-0.15.3-20220629/packages.dhall
sha256:48ee9f3558c00e234eae6b8f23b4b8b66eb9715c7f2154864e1e425042a0723b
in upstream