Skip to content

Instantly share code, notes, and snippets.

Avatar
💥
¯\_(ツ)_/¯

Maximilian Krauß maximilian-krauss

💥
¯\_(ツ)_/¯
View GitHub Profile
View login-flow.json
{
"_type": "export",
"__export_format": 4,
"__export_date": "2020-10-13T05:43:34.282Z",
"__export_source": "insomnia.desktop.app:v2020.4.1",
"resources": [
{
"_id": "req_97efcf20fc77413884513e443f097fbc",
"parentId": "wrk_e4b4380923e1460fb7768efbd66f65e0",
"modified": 1602567245088,
View server.js
const fastify = require('fastify').default // npm install fastify
let sessionId = 0
async function fireAndForget () {
const server = fastify()
.route({
url: '/login',
method: 'POST',
handler: async (request) => {
const { username } = request.body
View task-template.task.js
'use strict';
this.res.send({
msg: 'Hello from subkit.io!'
});
View job-template.job.js
'use strict';
//Open your Log-Stream to show the output.
console.log('Hello from subkit.io!');
@maximilian-krauss
maximilian-krauss / foo.task.js
Last active Oct 31, 2015
example subkit task
View foo.task.js
'use strict'
this.res.send({
message: 'bar'
});
View dynamo.html
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script>
var dynamo = function(obj, path, value) {
if(obj === undefined || path === undefined) {
return undefined;
@maximilian-krauss
maximilian-krauss / pagination.html
Created Apr 23, 2014
angular.js: Simple pagination through objects
View pagination.html
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css">
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">
</head>
<body ng-app="app">
<div ng-controller="DemoCtrl">
View coalesce.js
/*
Pass n arguments or an array with values and this method returns the first with a valid value.
Invalid values are: null, undefined, 0, ''
*/
var coalesce = function(/* n arguments */) {
var index,
args;
if(arguments.length === 0) {
return undefined;
View keybase.md

Keybase proof

I hereby claim:

  • I am maximilian-krauss on github.
  • I am maximilian (https://keybase.io/maximilian) on keybase.
  • I have a public key whose fingerprint is 83CA 569E 408F 88D2 E0D1 7E7D AAFB 2BD2 4929 04B5

To claim this, I am signing this object:

View UriHelper.cs
static class UriHelper {
public static Uri Combine(params string[] parts) {
var raw = new StringBuilder();
for (int i = 0; i < parts.Length; i++) {
var p = parts[i];
if (p.StartsWith("/"))
p = p.Substring(1);
raw.Append(
p.EndsWith("/") || i == parts.Length - 1 ? p : p + "/"