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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Diff to HTML by rtfpessoa</title>
<!--
Diff to HTML (template.html)
Author: rtfpessoa
-->
@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 / ActionCreator.java
Last active April 12, 2022 12:29
Reuse the same entity manager for each request
package foo;
import java.lang.reflect.Method;
import java.util.concurrent.CompletionStage;
import javax.inject.Inject;
import play.Logger;
import play.db.jpa.JPAApi;
import play.mvc.Action;

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@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 / ubuntu-https-mirrors.txt
Created July 10, 2018 22:02
Bash command to find out which ubuntu repo mirrors support https
# From https://pastebin.com/QY2TQ1dq
# More details about the mirrors: https://launchpad.net/ubuntu/+archivemirrors
# Run this in bash
for mirror in $(wget -O - https://launchpad.net/ubuntu/+archivemirrors | grep '>http</a>' | cut -d '"' -f 2); do https_mirror=https${mirror#http}; wget --timeout 2 --tries=1 "$https_mirror" && echo "$https_mirror" >> https_mirrors; done
# Checkout the created file https_mirrors
https://mirror.aarnet.edu.au/pub/ubuntu/archive/
https://mirror.tcc.wa.edu.au/ubuntu/
https://mirror.reismil.ch/ubuntu/
@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