Skip to content

Instantly share code, notes, and snippets.

View robvanderleek's full-sized avatar
💭
👋 Hello Internet

Rob van der Leek robvanderleek

💭
👋 Hello Internet
View GitHub Profile
@robvanderleek
robvanderleek / index.js
Created September 30, 2020 06:59
Backpack issue 5
diff --git a/index.js b/index.js
index 3cbc816..03e0acb 100755
--- a/index.js
+++ b/index.js
@@ -6,6 +6,7 @@ const path = require('path');
function usage() {
console.log(
'Backpack usage:\n' +
+ ' List files in backpack: bp -l\n' +
' Put in backpack: bp -i <filename>\n' +
@robvanderleek
robvanderleek / index.js
Created September 28, 2020 21:57
Backpack issue #3
#!/usr/bin/env node
const fs = require('fs');
const os = require('os');
const path = require('path');
function usage() {
console.log(
'Backpack usage:\n' +
' Put in backpack: bp -i <filename>\n' +
' Get from backpack: bp -e <filename>\n')
@robvanderleek
robvanderleek / README.md
Last active April 13, 2022 03:14
Simple RTSP test server

Simple RTSP test server

Sometims you just need to have a local RTSP stream to test your software against. The attached script start-rtsp-stream.sh does just that. It requires Docker and ffmpeg and can be launched with zero arguments to give you an RTSP stream of a looped video:

$ ./start-rtsp-stream.sh
Stopping server (if running)...
Starting simple RTSP server...
Starting video stream at: rtsp://localhost:8554/live.stream
@robvanderleek
robvanderleek / README.md
Last active December 25, 2020 12:34
Auto-merge Dependabot Pull-Requests

Auto-merge Dependabot Pull-Requests

Since Dependabot was acquired by GitHub the native Dependabot auto-merge functionality stopped working, This is a way to re-enable that functionality for a repository.

  1. Create a Dependabot configuration YAML (look here for the syntax) for your repository in .github/dependabot.yml, for example:
version: 2
updates:
- package-ecosystem: npm
@robvanderleek
robvanderleek / s3prune.py
Created September 5, 2018 22:47
Prunes folder (all object versions and delete markers) on S3
#!/usr/bin/env python
# Prunes folder (all object versions and delete markers) on S3
import boto3
import sys
if len(sys.argv) != 3:
print('usage: {} <bucket> <prefix>'.format(sys.argv[0]))
sys.exit(1)
if sys.argv[2] == '/':
@robvanderleek
robvanderleek / WordUtils.java
Last active January 17, 2018 21:52
Guideline #1
public static String wrap(final String str, int wrapLength, String newLineStr, final boolean wrapLongWords, String wrapOn) {
if (str == null) {
return null;
}
if (newLineStr == null) {
newLineStr = System.lineSeparator();
}
if (wrapLength < 1) {
wrapLength = 1;
}
@robvanderleek
robvanderleek / NumberUtils.java
Created January 17, 2018 21:31
Guideline #1
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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
*

Keybase proof

I hereby claim:

  • I am robvanderleek on github.
  • I am robvanderleek (https://keybase.io/robvanderleek) on keybase.
  • I have a public key ASCfHhvwDtFfrCxzyA_TcphNT-M8mPE0JqY2KOSylgo3bwo

To claim this, I am signing this object:

@robvanderleek
robvanderleek / .travis.yml
Last active April 9, 2017 10:03
Buzz generator Travis configuration
sudo: required
services:
- docker
language: python
script:
- python -m pytest -v
@robvanderleek
robvanderleek / deploy_heroku.sh
Last active December 1, 2019 21:34
Buzz generator deploy to Heroku
#!/bin/sh
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
heroku container:login
heroku container:push web --app $HEROKU_APP_NAME
heroku container:release web --app $HEROKU_APP_NAME