Skip to content

Instantly share code, notes, and snippets.

View bobvanderlinden's full-sized avatar

Bob van der Linden bobvanderlinden

  • The Netherlands
View GitHub Profile
@bobvanderlinden
bobvanderlinden / example.html
Last active October 28, 2022 20:41
Simple QR-Code scanner based on jsqrcode
<html>
<head>
<script src="https://webqr.com/llqrcode.js"></script>
<script src="jsqrcode-camera.js"></script>
</head>
<body>
<div id="qrcodescanner"></div>
<div id="message"></div>
</body>
<script>
@bobvanderlinden
bobvanderlinden / keybase.md
Created September 20, 2017 10:08
keybase.md

Keybase proof

I hereby claim:

  • I am bobvanderlinden on github.
  • I am bobvanderlinden (https://keybase.io/bobvanderlinden) on keybase.
  • I have a public key ASD-ZmTE-wd3nzKSoc_5qjuJWSfzf4VNLu_QLdNYOy5O2Ao

To claim this, I am signing this object:

@bobvanderlinden
bobvanderlinden / FrameLayout.css
Created September 25, 2017 18:47
FrameLayout React component: scale content while maintaining aspect ratio
.framelayout {
margin: 0;
padding: 0;
border: 0;
display: flex;
align-items: center;
justify-content: center;
}
@bobvanderlinden
bobvanderlinden / configuration.nix
Created October 2, 2017 20:05
Gogs test configuration
{ config, pkgs, ... }:
{
virtualisation.graphics = false;
services.mingetty.autologinUser = "root";
boot.loader.grub.device = "/dev/sda";
networking.firewall.enable = false;
services.gogs = {
enable = true;
@bobvanderlinden
bobvanderlinden / default.nix
Created October 4, 2017 20:25
Example of reproducible deployments using nix-shell and nixops
{
server = {
deployment.targetHost = "target.host.com";
services.openssh.enable = true;
};
}
@bobvanderlinden
bobvanderlinden / build.gradle
Last active May 18, 2018 07:06
Git revision in Android build config using Gradle
def exec(String cmdline) {
def os = new ByteArrayOutputStream()
exec {
commandLine cmdline.split(" ")
standardOutput = os;
}
return os.toString().replaceAll('\\s', '')
}
def getGitSha() {
@bobvanderlinden
bobvanderlinden / build.gradle
Created May 18, 2018 07:16
Publish APK over SSH using Gradle
ant.taskdef(
name: 'scp',
classname: 'org.apache.tools.ant.taskdefs.optional.ssh.Scp',
classpath: configurations.sshAntTask.asPath
)
// Publish APK and mapping file over SCP
android.applicationVariants.all { variant ->
if (variant.buildType.name != "release") {
return
@bobvanderlinden
bobvanderlinden / build.gradle
Last active May 18, 2018 07:24
Publish APK over S3 using Gradle
buildscript {
dependencies {
classpath "com.amazonaws:aws-java-sdk:1.3.11"
}
}
def awsCredentials = new BasicAWSCredentials(awsAccessKey, awsSecretKey)
// Publish APK and mapping file over SCP
android.applicationVariants.all { variant ->
@bobvanderlinden
bobvanderlinden / README.md
Last active May 18, 2018 12:02
Changelog in Markdown/JSON using Gradle

This Gradle script will generate a changelog.json file from a recent_changes.txt. The recent_changes.txt is a Markdown file where a developer can define the changelog and the Gradle task will convert it to JSON, so that it can be used inside a app or in later Gradle tasks. The resulting JSON structure can be found in example.changelog.json.

In addition, the changelog.json is reused for a whatsnew file that can be uploaded to Google Play using Google Play Publisher.

@bobvanderlinden
bobvanderlinden / pom.xml
Created May 27, 2018 14:43
go-offline failure case
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.maven.test</groupId>
<artifactId>main</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>My Dependency Test</name>
<description/>