Skip to content

Instantly share code, notes, and snippets.

View ericr3r's full-sized avatar

Eric Rauer ericr3r

View GitHub Profile
@ericr3r
ericr3r / WebIntegrationTests.scala
Created September 1, 2011 21:53
Web plugin to start Jetty before running Integration Tests
import sbt._
import Keys._
import com.github.siasia.WebPlugin
import WebPlugin._
// project/plugin/WebIntegrationTests
object WebIntegrationTests extends Plugin {
@ericr3r
ericr3r / errata
Last active December 22, 2015 18:59
Chef Infrastructure Automation Cookbook errata
* What page in the book does this errata appear?: 26
Please describe the errata.:
Step 5 create the Berksfile using the command "mma@laptop:~/chef-repo $ subl Berksfile" instead of
"mma@laptop:~/chef-repo $ subl cookbooks/my_cookbook/Berksfile".
* What page in the book does this errata appear?: Page 63
Please describe the errata.:
Step 7, Create the template file has "mma@laptop:~/chef-repo $ subl cookbooks/my_cookbook/recipes/default.rb" instead of "mma@laptop:~/chef-repo $ subl cookbooks/my_cookbook/templates/default/greeting.txt.erb"
@ericr3r
ericr3r / gist:6633275
Created September 20, 2013 04:23
Chef Infrastructure errata
require 'chefspec'
describe 'my_cookbook::default' do
let(:chef_run) { ChefSpec::ChefRunner.new(platform:'ubuntu', version:'12.04') }
it 'creates a greetings file, containing the platform name' do
chef_run.converge(described_recipe)
expect(chef_run).to create_file_with_content('/tmp/greeting.txt','Hello! ubuntu!')
end
add bluez patches to Nerves system from https://github.com/raspberrypi/linux/issues/1314
patches/bluez5_utils/0001-bcm43xx-Add-bcm43xx-3wire-variant.patch
patches/bluez5_utils/0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch
patches/bluez5_utils/0003-Increase-firmware-load-timeout-to-30s.patch
patches/bluez5_utils/0004-Move-the-43xx-firmware-into-lib-firmware.patch
update nerves_defconfig to include bluez and patches:
-BR2_GLOBAL_PATCH_DIR="${BR2_EXTERNAL_NERVES_PATH}/patches"
+BR2_GLOBAL_PATCH_DIR="${BR2_EXTERNAL_NERVES_PATH}/patches ${NERVES_DEFCONFIG_DIR}/patches"
@ericr3r
ericr3r / keybase.md
Created December 12, 2018 23:09
keybase.md

Keybase proof

I hereby claim:

  • I am erauer on github.
  • I am erauer (https://keybase.io/erauer) on keybase.
  • I have a public key ASCNPsbBgzf9OzD6HBP9dSuMnBDiFLxgGBEFHtz-tu1YnAo

To claim this, I am signing this object:

@ericr3r
ericr3r / grub.txt
Last active January 2, 2020 18:04
Arch Grub Recovery - custom for my partitions
# Open encyryped filesystem
cryptsetup open --type luks /dev/nbme0n1p6 vg0
# Mount the filesytem
mount /dev/mapper/vg0-root /mnt # /mnt is the installed system
swapon /dev/mapper/vg0-swap # Not needed but a good thing to test
mkdir /mnt/boot
mount /dev/nvme0n1p5 /mnt/boot
mkdir /mnt/boot/efi
mount /dev/nvme0n1p1 /mnt/boot/efi

Keybase proof

I hereby claim:

  • I am erauer on github.
  • I am erauer (https://keybase.io/erauer) on keybase.
  • I have a public key ASDM0TFMMxO-Rxrihkz6ixK1a2mmmFFHr0bsfuhYlvBHLAo

To claim this, I am signing this object:

@ericr3r
ericr3r / changes.ex
Created March 4, 2021 19:27
pkix sign
#
# Code contained in this function is under copyright as follows
#
# Copyright Ericsson AB 2008-2018. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
#
defp pkix_sign(tbs_cert, key) do
sa = otp_tbs_certificate(tbs_cert, :signature)
sig_alg = signature_algorithm(sa, :algorithm)
{
description = "Nerves build environment";
inputs = {
nixpkgs = { url = "github:NixOS/nixpkgs/nixos-22.11"; };
flake-utils = { url = "github:numtide/flake-utils"; };
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
@ericr3r
ericr3r / gist:4df961031f158059a1efd8cbffed7daa
Last active September 7, 2024 00:49
Flake for building Nerves System
# Flake for building nerves system
# Use `nix develop .` for regular Nerves builds
# Use `nix develop .#fhs` for Nerves System builds
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }: