Skip to content

Instantly share code, notes, and snippets.

View coffeejunk's full-sized avatar
:shipit:

Maximilian Haack coffeejunk

:shipit:
View GitHub Profile
@coffeejunk
coffeejunk / README.md
Last active April 3, 2024 19:17
Asahi Full Disk Encryption

Using lsblk -f /dev/nvme0n1, identify the partition used for the root filesystem. This should present as a btrfs file system with the label fedora. In the example below, /dev/nvme0n1p6 is the Fedora root filesystem that will be encrypted in place:

[root@fedora ~]# lsblk -f /dev/nvme0n1
NAME        FSTYPE FSVER LABEL        UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1
├─nvme0n1p1 apfs                      4ccf344c-1842-4ed2-98f7-d34a509f5a88
├─nvme0n1p2 apfs                      dbb4789e-c51d-46bf-8332-90a43b4e4fa7
├─nvme0n1p3 apfs                      b98ec259-629b-4aee-9f26-02c5098abcee
├─nvme0n1p4 vfat FAT32 EFI-FEDORA B01E-2641 419.8M 16% /run/.system-efi
@coffeejunk
coffeejunk / How-to-automate-build-bottles-your-homebrew-tap.md
Created September 26, 2023 14:31 — forked from maelvls/How-to-automate-build-bottles-your-homebrew-tap.md
Automate build workflow for Homebrew tap bottles (Linux and macOS)

How to automate the build of bottles on your Homebrew tap

Note on Oct 4, 2018: due to a change in Homebrew's brew test-bot behaviour, the user must set HOMEBREW_TRAVIS_CI and HOMEBREW_TRAVIS_SUDO appropriately (it was previously using Travis-CI-provided TRAVIS and TRAVIS_SUDO).

This tutorial is a follow-up to the discussion we had on davidchall/homebrew-hep#114. It relies on a fork of the test-bot provided by davidchall; you can get it with brew tap maelvalais/test-bot. First:

  1. the Github project must be of the form https://github.com//homebrew- with the following tree
@coffeejunk
coffeejunk / RPi_I2C_driver.py
Created August 14, 2020 20:57 — forked from DenisFromHR/RPi_I2C_driver.py
RaspberryPi I2C LCD Python stuff
# -*- coding: utf-8 -*-
"""
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic
Made available under GNU GENERAL PUBLIC LICENSE
# Modified Python I2C library for Raspberry Pi
# as found on http://www.recantha.co.uk/blog/?p=4849
# Joined existing 'i2c_lib.py' and 'lcddriver.py' into a single library
# added bits and pieces from various sources
# By DenisFromHR (Denis Pleic)
@coffeejunk
coffeejunk / ASS.md
Created July 21, 2020 14:30 — forked from klaaspieter/ASS.md
Acronyms Seriously Suck - Elon Musk

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

@coffeejunk
coffeejunk / geoserver-install.sh
Created June 3, 2020 16:55 — forked from iacovlev-pavel/geoserver-install.sh
Install GeoServer on Ubuntu 18.04
#
apt-get install openjdk-8-jre
# PostgreSQL and PostGIS
apt-get install postgresql postgresql-contrib postgis postgresql-10-postgis-2.4
# Create "geoserver" database
sudo -u postgres createuser -P geoserver
sudo -u postgres createdb -O geoserver geoserver
sudo -u postgres psql -c "CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology;" geoserver
@coffeejunk
coffeejunk / infoClickHandler.js
Created June 1, 2020 14:10 — forked from xemoka/infoClickHandler.js
infoClickHandler
function infoClickHandler (event) {
console.log('Info Click Handler Fired:', event)
let currentInfos = [] // the array we'll fill with the data returned from arcgis Server
// get pixel click location
const pixel = mapElement.getEventPixel(event.originalEvent)
// generate list of layers
let layers = []

How to setup AWS lambda function to talk to the internet and VPC

I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.

So it might be really unintuitive at first but lambda functions have three states.

  1. No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
  2. VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
  3. VPC with NAT, The best of both worlds, AWS services and web.
{
"errors": [
"Resource JSON Schema validation errors: [\"ceterms:subject : did not match the following type: object\"]"
],
"json_schema": [
"http://localhost:9292/schemas/envelope",
"http://localhost:9292/schemas/ce_registry/assessment_profile",
"http://localhost:9292/schemas/json_ld"
]
}
{
"errors": [
"Resource JSON Schema validation errors: [\"ceterms:externalResearch : did not match the following type: array\"]"
],
"json_schema": [
"http://localhost:9292/schemas/envelope",
"http://localhost:9292/schemas/ce_registry/assessment_profile",
"http://localhost:9292/schemas/json_ld"
]
}
{
"errors": [
"Resource JSON Schema validation errors: [\"_ : The property '#/ceterms:estimatedCost/1/ceterms:startTime' must be a valid RFC3339 date/time string in schema 3358c740-9ed2-5ef2-ba21-7112c0db8826#\"]"
],
"json_schema": [
"http://localhost:9292/schemas/envelope",
"http://localhost:9292/schemas/ce_registry/learning_opportunity_profile",
"http://localhost:9292/schemas/json_ld"
]
}