Skip to content

Instantly share code, notes, and snippets.

View maveonair's full-sized avatar
👨‍💻

Fabian Mettler maveonair

👨‍💻
View GitHub Profile
@maveonair
maveonair / luks-encrypted-root-on-nixos.org
Created February 19, 2026 20:49 — forked from walkermalling/luks-encrypted-root-on-nixos.org
Nix Setup with LUKS encrypted root

Setting up NixOs with LUKS encrypted root

Here are my working notes on getting a system up and running.

WARNING: You can run into a hidden problem that will prevent a correct partition setup and /etc/nixos/configuration.nix from working: if you are setting up a UEFI system, then you need to make sure you boot into the NixOS installation from the UEFI partition of the bootable media. You may have to enter your BIOS boot selection menu to verify this. For example, if you setup a NixOS installer image on a flash drive, your BIOS menu may display several boot options from that flash drive: choose the one explicitly labeled with “UEFI”.

References

I used these resources:

➜ esphome compile siebenuhr_git.yaml
INFO ESPHome 2025.12.3
INFO Reading configuration siebenuhr_git.yaml...
INFO Cloning https://github.com/soliddifference/siebenuhr_esphome.git@main
INFO Fetching main
INFO Detected timezone 'Europe/Zurich'
INFO Generating C++ source...
INFO Core config or version changed, cleaning build files...
INFO Compiling app... Build path: /Users/maveonair/Code/github.com/maveonair/siebenuhr_esphome/.esphome/build/siebenuhr
@maveonair
maveonair / gist:11db8885fb63dbc4dc1c649de6469155
Created November 23, 2016 15:21
Use ngrok with aspnet iisexpress
ngrok http -host-header=rewrite localhost:5219
@maveonair
maveonair / docker-commands.md
Last active July 28, 2016 08:06
Useful docker commands

Remove dangling docker images

docker rmi $(docker images -f "dangling=true" -q)
@maveonair
maveonair / gist:6420652
Created September 3, 2013 07:21
Sometimes it is not possible to add the pry-rails gem to a rails project. For this reason a starting the rails console with pry and execute the following ruby code:
# start rails console first:
# bundle exec pry -r ./config/environment
require rails
require 'rails/console/app'
require 'rails/console/helpers'
extend Rails::ConsoleMethods
ActiveRecord::Base.logger = Logger.new(STDOUT)
@maveonair
maveonair / pdf_export.rb
Last active December 21, 2015 08:28
Prawn PDF Export with page break for bounding_box
class PdfExport < Prawn::Document
def to_pdf
build_pdf
render
end
def build_pdf
add_page_break_if_overflow do
bounding_box([155, cursor - 25], :width => 330) do
# Put some PDF text here...
@maveonair
maveonair / xvfb
Last active December 19, 2015 19:38 — forked from rsanheim/xvfb
chown user /etc/init.d/xvfb
chmod +x /etc/init.d/xvfb
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.android.volley.AuthFailureError;
import com.android.volley.NetworkResponse;
import com.android.volley.ParseError;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.Response.ErrorListener;
import com.android.volley.Response.Listener;
@maveonair
maveonair / create_fixture.rb
Created June 30, 2013 19:41
Rails: load/create fixtures via the Rails console
require 'active_record/fixtures'
ActiveRecord::Fixtures.create_fixtures("#{Rails.root}/test/fixtures", "fixture")
@maveonair
maveonair / install_ruby_rbenv.sh
Last active December 18, 2015 03:39 — forked from thomaswitt/install_ruby_rbenv_sh
Installing Ruby with umlaut support when using Rbenv
#!/bin/sh
if [[ -z "$1" ]]; then
echo "No Ruby version was specified."
echo "example: install_ruby_rbenv.sh 1.9.3-p429"
exit 1
fi
RUBY_VERSION=$1
###Use this for global readline for later reuse