I hereby claim:
- I am mdonkers on github.
- I am mdonkers (https://keybase.io/mdonkers) on keybase.
- I have a public key whose fingerprint is 9AEF 5150 9C3C F6F5 5970 3C24 A957 88A1 2404 6A96
To claim this, I am signing this object:
sed -i -r -e 's/(.*)\[(([[:alnum:]]|[[:space:]])+)\]\((http([[:alnum:]]|[[:punct:]])+)\)(.*)/\1<a href="\4" target="_blank">\2<\/a>\6/g' [input-file]... |
#!/usr/bin/env python3 | |
""" | |
License: MIT License | |
Copyright (c) 2023 Miel Donkers | |
Very simple HTTP server in python for logging requests | |
Usage:: | |
./server.py [<port>] | |
""" | |
from http.server import BaseHTTPRequestHandler, HTTPServer |
#!/bin/bash | |
# encrypt (leave one empty line after password) | |
#gpg -e -a -r <user-id> your_password_file | |
set -e | |
# Must be a valid filename | |
NAME=my-vpn | |
PIDFILE=/var/run/$NAME.pid |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
## Call with 'source activate_environment.sh <env>' | |
function check_sourced { | |
local last_elem=${#FUNCNAME[@]}-1 | |
if [[ "main" == ${FUNCNAME[$last_elem]} ]] ; then | |
echo "Being executed from a sub-shell, which won't set the environment correctly" | |
echo "Execute as 'source activate_environment <env>' or '. activate_environment <env>'" |
from flask import Flask, session, redirect, url_for, escape, request | |
import math | |
import re | |
app = Flask(__name__) | |
def get_name(question): return "Miel" | |
myApp.directive('statsList', function () { | |
return { | |
restrict: 'E', | |
scope: { | |
items: '=listType', | |
orderBy: '@' | |
}, | |
templateUrl: 'partials/partial1.html' | |
}; | |
}); |
myApp.factory('couchService', function (basicCouchService) { | |
return { | |
get: function(listType, response) { | |
// Convert the input parameters to the schema-names used inside CouchDB | |
var couchSchema = (listType.listType === 'latest') ? 'by_submit' : 'by_duration'; | |
basicCouchService.get({listType: couchSchema}, function (localResponse) { | |
// Get the top-10, assume the array is already ordered wrong way around. | |
var rowList = localResponse.rows; | |
rowList = rowList.slice(rowList.length - 10, rowList.length); | |
localResponse.rows = rowList; |
object Application extends Controller { | |
def index(path: String) = Action { | |
Ok(views.html.main()) | |
} | |
} |