Skip to content

Instantly share code, notes, and snippets.

View rrrnld's full-sized avatar

rrrnld

View GitHub Profile
#!/usr/bin/env bash
LOG="/var/log/update-dyndns.log"
USER="DYNDNS2_USER"
PASS="DYNDNS2_PASS"
URL="DYNDNS2_ENDPOINT"
exec > >(tee -i ${LOG})
exec 2>&1
@rrrnld
rrrnld / keybase.md
Last active January 10, 2018 10:39

Keybase proof

I hereby claim:

  • I am heyarne on github.
  • I am heyarne (https://keybase.io/heyarne) on keybase.
  • I have a public key ASDvj02EXJrTlfilf9OLmjN9lMYO6Is93UU-gqkZeAr_hAo

To claim this, I am signing this object:

server {
listen 80;
listen [::]:80;
server_name my.server.address;
# enforce https
return 301 https://$server_name$request_uri;
# index index.html;
}
server {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rrrnld
rrrnld / test-output.txt
Created December 12, 2017 10:18
fiona test output
============================= test session starts ==============================
platform darwin -- Python 2.7.10, pytest-3.3.1, py-1.5.2, pluggy-0.6.0
rootdir: /Users/heyarne/tmp/Fiona, inifile:
plugins: cov-2.5.1
collected 605 items
tests/test_bigint.py . [ 0%]
tests/test_bounds.py .... [ 0%]
tests/test_bytescollection.py FFFFFFFFFFsFFFFFFFFFFFFFFFFFFFFFFFFFFF. [ 7%]
tests/test_collection.py ............................................... [ 15%]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rrrnld
rrrnld / build.gradle
Created February 3, 2017 13:40
Android build version with git commit hash
// merge this with your current build.gradle
// generates a version name from currently checked out git commit
def getCommitHash = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = stdout
}
return stdout.toString().trim()
}
@rrrnld
rrrnld / README.md
Last active August 23, 2018 09:59
Get a random free port on uberspace

Setup instructions

Use ssh to login to your uberspace account, then:

$ wget -O free-port https://gist.githubusercontent.com/heyarne/9a6325149f765151bbcceb26a835dade/raw/1f07b69e62f0c47423acb5cb912482b7d65940f0/free-port.sh
$ chmod +x free-port
$ mv free-port ~/bin
$ free-port
$ # example output: 64477
@rrrnld
rrrnld / index.js
Created July 21, 2016 10:34
requirebin sketch
var Chance = require('chance')
var chance = new Chance()
// how many rows should be generated?
const amount = 100
// define all of the required fields in the form [[ $title1, $type1 ], [ $title2, $type2, $args2 ] ... ]
// $typeN maps to one of the functions exposed by the [chance api](http://chancejs.com/) (for example 'street' or 'email')
const stencil = [
[ 'Firma', 'word' ],
@rrrnld
rrrnld / koel-s3-storage.md
Last active October 27, 2018 00:47
How to use Amazon S3 with koel

How to use Amazon S3 for storing your koel media files

In this short tutorial I will show you a (kind of hacky, but working) option to set up your koel instance so that you can store your media files on S3 as provided by Amazon. I will also share some of the insights and experiences I had with the setup. Be aware that it's not officially supported and it might work differently to from what you expect. I myself have not had the setup running for a very long time yet. Feel free to share your thoughts in the comments below or add to the document.

If you feel like supporting me, maybe use my Digital Ocean referral link when signing up. If you do that, please also support the original authors of the various tools. They did the hard work, I just glued it together.

Basic setup