Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@klaasnotfound
klaasnotfound / base.html
Last active Apr 7, 2019
A minimal example for a base.html file that can be used with the modified Jekyll i18n plugin and performs a browser language-based redirect.
View base.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Simple Redirect Page</title>
</head>
<body>
<script>
var lang = navigator.language || navigator.userLanguage;
if (lang.indexOf('de') == 0)
@klaasnotfound
klaasnotfound / jekyll-multiple-languages-plugin.rb
Last active May 27, 2019
This is a modified version of the most popular Jekyll i18n plugin. It puts the default language in its own subfolder (like the other languages), uses a base.html file as the central index.html (for language-based redirects) and properly translates custom collection documents and links.
View jekyll-multiple-languages-plugin.rb
=begin
Jekyll Multiple Languages is an internationalization plugin for Jekyll. It
compiles your Jekyll site for one or more languages with a similar approach as
Rails does. The different sites will be stored in sub folders with the same name
as the language it contains.
Please visit https://github.com/screeninteraction/jekyll-multiple-languages-plugin
for more details.
View ActivityLifecycleHandler.java
// https://gist.github.com/klaasnotfound/e14adefddaf72b941ef4e4245edca7e4
/*
* Copyright 2015 Klaas Klasing (klaas [at] klaasnotfound.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
View PressableImageButton.java
package com.loclet.android.views;
/*
* Copyright 2015 Klaas Klasing (klaas@loclet.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0