Skip to content

Instantly share code, notes, and snippets.

View mulle-nat's full-sized avatar
🍀

Nat! mulle-nat

🍀
View GitHub Profile
@mulle-nat
mulle-nat / terminal.c
Created October 29, 2023 13:42
Run a curses app like btop from another unix process in a pty for educational purposes
//
// terminal.c
//
// Copyright (C) 2023 Nat!, Mulle kybernetiK.
// All rights reserved.
//
// Coded by Nat!
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
@mulle-nat
mulle-nat / convert-vcvars-to-shell.sh
Created January 26, 2023 22:21
Convert Visual Studio environment variables to bash for use in mingw (also run in mingw)
#! /usr/bin/env bash
#
# Copyright (c) 2023 Nat! - Mulle kybernetiK
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
@mulle-nat
mulle-nat / CLion.desktop
Created July 7, 2022 10:31
GNOME Desktop file for CLion
[Desktop Entry]
Type=Application
Exec=/home/nat/bin/clion-2022.1.3/bin/clion.sh
Icon=/home/nat/bin/clion-2022.1.3/bin/clion.svg
Name=CLion
Terminal=true
NoDisplay=true
StartupWMClass=jetbrains-clion
@mulle-nat
mulle-nat / mermaid
Last active February 15, 2022 13:34
Run dockerized mermaid more conveniently
#! /bin/sh
#
# shellcheck disable=SC2006
#
IFILE="$1"
case "${IFILE}" in
--help|help|-h|"")
cat <<EOF >&2
Usage:
@mulle-nat
mulle-nat / mulle-strip-whitespace
Created November 19, 2021 01:01
🚏💃👗 mulle-strip-whitespace strips off leading and trailing spaces
#! /bin/sh
#
# Copyright (c) 2021 Nat! - Mulle kybernetiK
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
@mulle-nat
mulle-nat / mulle-objc-clone-all
Last active November 11, 2021 22:07
🐑 Clone all Repositories relevant for hacking on mulle-objc
#! /bin/sh
[ "${TRACE}" = 'YES' -o "${MULLE_OBJC_CLONE_ALL_TRACE}" = 'YES' ] && set -x && : "$0" "$@"
REPOS_M="mulle-bashfunctions"
REPOS_S="mulle-craft
mulle-dispense
mulle-domain
mulle-env
@mulle-nat
mulle-nat / mulle-printpdf
Last active June 6, 2022 16:48
mulle-printpdf - print a PDF file on a PostScript Network Printer
#!/bin/sh
#
# Print PDF to a PostScript capable network printer
#
PRINTER="${PRINTER:-brother.local}"
PRINTER_PORT="${PRINTER_PORT:-9100}"
if [ $# -eq 0 -o "$1" = '-h' -o "$1" = "--help" ]
then
@mulle-nat
mulle-nat / run-objc
Last active June 12, 2020 17:26
tcc -run <filename> for Objective-C (mulle-objc / Apple)
#! /usr/bin/env bash
#
# Coded by Nat! in 2020
# Public Domain
#
tmpdir=
mulle=
finish()
{
@mulle-nat
mulle-nat / build-mulle-aba.sh
Last active April 11, 2020 12:28
How to build mulle-aba in an ubuntu:bionic docker (manually without mulle-sde)
apt-get update
apt-get dist-upgrade
apt-get install -y cmake curl
# mulle-c11
mkdir src
cd src
curl -O -L https://github.com/mulle-c/mulle-c11/archive/4.0.0.tar.gz
tar xfz 4.0.0.tar.gz
cd mulle-c11-4.0.0/
@mulle-nat
mulle-nat / Default (OSX).sublime-keymap
Last active October 1, 2019 12:42
Sublime Text, add CTRL- shortcuts for copy/paste and some more
[
{ "keys": ["ctrl+c"], "command": "copy" },
{ "keys": ["ctrl+x"], "command": "cut" },
{ "keys": ["ctrl+v"], "command": "paste" },
{ "keys": ["ctrl+s"], "command": "save" },
{ "keys": ["ctrl+a"], "command": "move_to", "args": {"to": "bol", "extend": false} },
{ "keys": ["ctrl+e"], "command": "move_to", "args": {"to": "eol", "extend": false} }
]