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
  • Vienna, Austria
  • 16:09 (UTC +02:00)
View GitHub Profile
n:version:4
n:network-ike-port:500
n:network-mtu-size:1380
n:client-addr-auto:1
n:network-natt-port:4500
n:network-natt-rate:15
n:network-frag-size:540
n:network-dpd-enable:1
n:client-banner-enable:1
n:network-notify-enable:1
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
<!doctype html>
<title>dynamic</title>
<button onclick="addGeneratedForms()">addGeneratedForms</button>
<script>
function addGeneratedForms(){
var div = document.createElement('div');
div.innerHTML = '<form class="login" method="post" action="login">\
<input type="text" name="username">\
<input type="password" name="password">\
<button type="submit">login</button> stay on this page but update the url with pushState\
@mkurz
mkurz / export_repo_issues_to_csv.py
Last active October 11, 2015 15:19 — forked from unbracketed/export_repo_issues_to_csv.py
Export Issues from Github repo to CSV (API v3)
#!/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 / mig.py
Last active July 30, 2016 16:33 — forked from Jach/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