Skip to content

Instantly share code, notes, and snippets.

View Larusso's full-sized avatar
🍪
Ohmnomnom

Manfred Endres Larusso

🍪
Ohmnomnom
  • Wooga
  • Berlin
View GitHub Profile
@Larusso
Larusso / modeling_principles.md
Created May 11, 2026 12:03
Modeling Principles

Modeling Principles

This file captures cross-cutting modeling preferences for the project. These are not Rust-only rules and should inform shared-domain design in any implementation language.

Core Bias

Prefer stronger types and clearer boundaries over broad “flexible” models that rely on optional fields, runtime switches, and late validation.

The project is willing to accept a somewhat more complex type structure when that complexity makes invalid states harder to represent and module responsibilities easier to understand.

@Larusso
Larusso / check_elf_alignment.sh
Last active July 25, 2025 10:33
A slightly changed version of check_elf_alignment.sh which fails with exit code and prints proper on macOS
#!/bin/bash
progname="${0##*/}"
progname="${progname%.sh}"
# usage: check_elf_alignment.sh [path to *.so files|path to *.apk]
cleanup_trap() {
if [ -n "${tmp}" ] && [ -d "${tmp}" ]; then
rm -rf "${tmp}"
fi
#!/usr/bin/env zsh
#
# Bootstrap program for the system.
#
# Enable the default zsh options
emulate zsh
setopt errexit # exit the script if any statement returns a non-true valu
setopt pipefail # unveil hidden pipeline command errors
#!/usr/bin/expect
set timeout -1;
spawn ./android_sdk/tools/bin/sdkmanager --update
spawn ./android_sdk/tools/bin/sdkmanager --install "platform-tools" "build-tools;26.0.3" "build-tools;27.0.3" "build-tools;28.0.3" "platforms;android-26" "platforms;android-27" "platforms;android-28" "extras;android;m2repository"
expect {
"Accept? (y/N):" { exp_send "y\r" ; exp_continue }
eof
}
@Larusso
Larusso / Cargo.toml
Created October 30, 2019 08:13
CommandLineToArgvW rust wrapper
[dependencies]
winapi = { version = "0.3", features = ["shellapi","errhandlingapi"] }
widestring = "0.4.0"
@Larusso
Larusso / install_unity_editor_mac_os.sh
Created October 8, 2018 09:07
Install a unity editor to a specified destination
#!/usr/bin/env bash
set -x
installer=$1
destination=$2
tmpDestination="$destination/tmp"
mkdir -p $tmpDestination
xar -xf "$installer" -C "$tmpDestination"
tar -C "$destination" -zmxf "$tmpDestination/Unity.pkg.tmp/Payload"
@Larusso
Larusso / gitall
Created April 16, 2018 10:40
A small helper file to run git commands over multiple repos
#!/usr/bin/env ruby
root = Dir.pwd
def each_repo(root, &block)
Dir.foreach(root) {|repo|
if File.directory?(File.join(root, repo)) and File.exist?(File.join(root, repo, '.git'))
block.call(File.join(root,repo), repo)
end
}
end
@Larusso
Larusso / install_java.sh
Created June 1, 2017 13:26
windows linux subsystem java install
#!/bin/bash
set -ex
# UPDATE THESE URLs
export JDK_URL=http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz
export UNLIMITED_STRENGTH_URL=http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip
# Download Oracle Java 8 accepting the license
wget --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" \
@Larusso
Larusso / build.gradle
Created April 25, 2017 13:45
Jenkins plugin pinning example
buildscript {
repositories {
mavenCentral()
jcenter()
maven {
url 'http://repo.jenkins-ci.org/releases/'
}
}
dependencies {
classpath 'com.netflix.nebula:gradle-dependency-lock-plugin:4.9.3'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.