Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthias Kurz mkurz

  • Vienna, Austria
View GitHub Profile
@mkurz
mkurz / mig.py
Last active Jul 30, 2016 — forked from Jach/mig.py
View mig.py
#!/usr/bin/env python
'''
Steps:
1. Create any milestones
2. Create any labels
3. Create each issue, linking them to milestones and labels
3.1: Update status for new issue if closed
4: Create all the comments for each issue
'''
import getpass
@mkurz
mkurz / export_repo_issues_to_csv.py
Last active Oct 11, 2015 — forked from unbracketed/export_repo_issues_to_csv.py
Export Issues from Github repo to CSV (API v3)
View export_repo_issues_to_csv.py
#!/usr/bin/env python
"""
Exports Issues from a specified repository to a CSV file
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
"""
import csv
import requests
import json
@mkurz
mkurz / gist:061d413715f004c8c963
Created Jan 20, 2016 — forked from vr100/gist:81b37e89e9688d2ad02d
String and timestamp support in evolutions for play framework
View gist:061d413715f004c8c963
/**
* Read evolution files from the application environment.
*/
@Singleton
class EvolutionsReader @Inject() (environment: Environment) {
/**
* Read the application evolutions.
*
* @param db the database name
@mkurz
mkurz / html-languages.txt
Created Aug 11, 2016 — forked from JamieMason/html-languages.txt
HTML lang attribute / ISO language code reference / Culture names
View html-languages.txt
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)
View EvolutionsModule.scala
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 / install.sh
Created Jun 5, 2018 — forked from rafi/install.sh
setup msmtp and php
View install.sh
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
@mkurz
mkurz / debug-play-framework-test-intellij.md
Created Nov 16, 2018 — forked from jackmahoney/debug-play-framework-test-intellij.md
Debug Play Framework 2.x unit test in IntelliJ
View debug-play-framework-test-intellij.md

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.
View DevModeWorkarounds.scala
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 / gmail-github-filters.md
Created Mar 11, 2021 — forked from ldez/gmail-github-filters.md
Gmail and GitHub - Filters
View gmail-github-filters.md

Gmail and GitHub

Create new filters and create new labels.

Pull Request

from:(notifications@github.com) 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