Skip to content

Instantly share code, notes, and snippets.

Avatar

Falk Pauser fpauser

View GitHub Profile
View x11_container_tutorial.md

Running X11 applications using Podman

This is a short tutorial on using podman to run X11 applications. This need often arises when one has to run X11 applications on distros such as Silverblue, when the application for instance has no Flatpak and one doesn't want to install the particular app on their host OS (for instance for Silverblue this process would result in the need to layer a package and then reboot, something which understandably would get quite irritating after a while).

@fpauser
fpauser / Flexible Dockerized Phoenix Deployments.md
Created Mar 24, 2020 — forked from jswny/Flexible Dockerized Phoenix Deployments.md
A guide to building and running zero-dependency Phoenix (Elixir) deployments with Docker. Works with Phoenix 1.2 and 1.3.
View Flexible Dockerized Phoenix Deployments.md

Prelude

I. Preface and Motivation

This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.

For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai

@fpauser
fpauser / rust_wine.md
Created Dec 12, 2019 — forked from vi/rust_wine.md
Using Rust in Wine as a sort of cross-compiler
View rust_wine.md

Cross-compiling Rust from Linux to Windows using Wine

0. Ensure Rust works on Host

Let's create a dummy project for a test.

$ cargo new test
$ cd test/
$ mkdir examples
View keybase.md

Keybase proof

I hereby claim:

  • I am fpauser on github.
  • I am fpauser (https://keybase.io/fpauser) on keybase.
  • I have a public key ASDrheWhV9hcswZWgJj4b2tWHQnbcUVu9pkrLWqQpJv2TAo

To claim this, I am signing this object:

View console.log
[21:56 fpauser ~/dev]$ cd nerves-examples/
[21:56 fpauser ~/dev/nerves-examples (master)]$ ls
blinky hello_gpio hello_gpio_input hello_leds hello_network hello_phoenix hello_wifi neopixel README.md
[21:56 fpauser ~/dev/nerves-examples (master)]$ cd hello_phoenix/
[21:57 fpauser ~/dev/nerves-examples/hello_phoenix (master)]$ ls
apps config mix.exs mix.lock README.md
[21:57 fpauser ~/dev/nerves-examples/hello_phoenix (master)]$ export MIX_TARGET=rpi3
[21:57 fpauser ~/dev/nerves-examples/hello_phoenix (master)]$ mix deps.get
Env
MIX_TARGET: rpi3
View bash.log
fpauser@2183NB223:~/dev/elixir$ mix new nerves_test --umbrella
* creating .gitignore
* creating README.md
* creating mix.exs
* creating apps
* creating config
* creating config/config.exs
Your umbrella project was created successfully.
Inside your project, you will find an apps/ directory
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View audio-fx-es6.js
/* es6-yfied https://github.com/jakesgordon/javascript-audio-fx */
export default class AudioFX {
constructor(src, options = {}, onload = () => {}) {
this.detectCapabilities();
let formats = options.formats || [];
let format = this.choose(formats);
this.pool = [];
@fpauser
fpauser / components.count-down.js
Last active May 12, 2016
Countdown with Ember
View components.count-down.js
import Ember from 'ember';
const minSecs = 60;
const hourSecs = 60 * minSecs;
const daySecs = 24 * hourSecs;
export default Ember.Component.extend({
classNames: 'count-down',
timeout: null,
delay: null,
@fpauser
fpauser / README.md
Last active Mar 10, 2016
Improved font-rendering (Korora 23)
View README.md

Check current values with xrdb -query -all.

Run echo "Xft.lcdfilter: lcddefault" > ~/.Xresources

Reboot.

Check current values with xrdb -query -all.