Skip to content

Instantly share code, notes, and snippets.

View mkurz's full-sized avatar
💭
Play Roadmap: https://github.com/orgs/playframework/projects/3

Matthias Kurz mkurz

💭
Play Roadmap: https://github.com/orgs/playframework/projects/3
View GitHub Profile
@mkurz
mkurz / readme.md
Created December 11, 2024 23:54 — forked from flightmansam/readme.md
Using a Studio Display with asahi linux

Preface: I f**king love where Asahi linux is going. After installing it on my macbook pro a year ago I have had an absolute blast getting it all up and running. I haven't ever had so much fun just enjoying the experience of an operating system.

I am one of those apple fanbois who setup a mac and a Studio Display. I have been itching to connect my display. But as I eagerly await USB-C DP (alt) mode support in Asahi I must make do with using the HDMI port of my Asahi Linux MacBook Pro. For those playing along at home, the Studio Display has only a usb-c port for display input. People (including Apple's own ambiguous advertising) mistake this to be a Thunderbolt only display however it is very happy connecting to any device that supports USB-C DP (alt) (I was even using my phone as a daily driver with the display for a cheeky bit there). Perhaps that's my fuzziness around the topic of USB-C/Thunderbolt3/4

I have been successful in connecting my display to th

@mkurz
mkurz / README.md
Created December 11, 2024 09:54 — forked from GrabbenD/README.md
org.freedesktop.secrets

Setup org.freedesktop.secrets the easy way with KeepassXC in Github Desktop

Overview

You might want to quickly authenticate with your Github Account to avoid having to manually configure GIT.

Although if you're using a lightweight distribution you might discover that you have to manually find a provider for org.freedesktop.secrets.

I encountered this problem and wanted to share my thoughts and general pointers from what I've learned!

@mkurz
mkurz / 1-README.md
Created March 7, 2023 10:30 — forked from ruario/1-README.md
A script that fetches a ChromeOS image for ARM32 and extracts the Widevine binary, saving it in a compressed archive for use with Vivaldi

The included script 'widevine-flash_armhf.sh' fetches a ChromeOS image for ARM and extracts the Widevine binary, saving it in a compressed archive. Since it downloads a fairly large file (2Gb+ on disk after download) it is recommended that you run the script on a machine that has plenty of disk space.

To install the resultant archive, issue the following on your ARM machine–after copying over the archive if needed:

sudo tar Cfx / widevine-flash-20200124_armhf.tgz

(Where 'widevine-flash-20200124_armhf.tgz' is updated to reflect the actual name of the created archive)

@mkurz
mkurz / gmail-github-filters.md
Created March 11, 2021 17:29 — forked from ldez/gmail-github-filters.md
Gmail and GitHub - Filters

Gmail and GitHub

Create new filters and create new labels.

Pull Request

from:([email protected]) AND {"Patch Links" "approved this pull request." "requested changes on this pull request." "commented on this pull request." "pushed 1 commit." "pushed 2 commits." "pushed 3 commits."}

label: gh-pull-request

import javax.inject.Inject
import scala.concurrent.Future
import play.api.{Configuration, Environment, Mode}
import play.api.inject.{ApplicationLifecycle, Binding, Module}
import play.api.libs.Files.DefaultTemporaryFileCreator
class DevModeWorkaroundsModule extends Module {
def bindings(environment: Environment, configuration: Configuration): Seq[Binding[_]] = {
Seq(bind[DevModeWorkarounds].toSelf.eagerly())
@mkurz
mkurz / debug-play-framework-test-intellij.md
Created November 16, 2018 11:54 — forked from jackmahoney/debug-play-framework-test-intellij.md
Debug Play Framework 2.x unit test in IntelliJ

In build.sbt add the following lines:

Keys.fork in Test := false
parallelExecution in Test := false
  • Start the play console in debug mode $ play debug.
  • Create a RemoteDebug run configuration in IntelliJ. This is only a debugger, not a compiler.
  • Run this configuration listening on port 9999.
@mkurz
mkurz / install.sh
Created June 5, 2018 14:47 — forked from rafi/install.sh
setup msmtp and php
apt-get install msmtp ca-certificates
vim /etc/msmtprc
# Set defaults.
defaults
# Enable or disable TLS/SSL encryption.
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
package modules
import java.io.{FileInputStream, InputStream}
import javax.inject.{Inject, Provider, Singleton}
import play.api.db.DBApi
import play.api.{Configuration, Environment}
//import play.Environment
import play.api.db.evolutions._
import play.api.inject.{Injector, Module}
@mkurz
mkurz / html-languages.txt
Created August 11, 2016 12:15 — forked from JamieMason/html-languages.txt
HTML lang attribute / ISO language code reference / Culture names
CULTURE SPEC.CULTURE ENGLISH NAME
--------------------------------------------------------------
Invariant Language (Invariant Country)
af af-ZA Afrikaans
af-ZA af-ZA Afrikaans (South Africa)
ar ar-SA Arabic
ar-AE ar-AE Arabic (U.A.E.)
ar-BH ar-BH Arabic (Bahrain)
ar-DZ ar-DZ Arabic (Algeria)
ar-EG ar-EG Arabic (Egypt)
@mkurz
mkurz / gist:061d413715f004c8c963
Created January 20, 2016 09:07 — forked from vr100/gist:81b37e89e9688d2ad02d
String and timestamp support in evolutions for play framework
/**
* Read evolution files from the application environment.
*/
@Singleton
class EvolutionsReader @Inject() (environment: Environment) {
/**
* Read the application evolutions.
*
* @param db the database name