Skip to content

Instantly share code, notes, and snippets.

View kekru's full-sized avatar

Kevin Krummenauer kekru

View GitHub Profile
@bendisposto
bendisposto / core.clj
Created March 16, 2017 09:21
REPL Session - Generative Testing, Softwerkskammer Ruhr, 15.3.2017
(ns bsp.core
(:require [clojure.repl :refer :all]
[clojure.spec :as spec]
[clojure.test.check :refer [quick-check]]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :refer [for-all]]
[clojure.test :refer [is are run-tests deftest]]))
(defn ultrasort [coll] (seq (into (sorted-set) coll)))
@dettmering
dettmering / ping.1m.py
Created January 30, 2019 08:12
BitBar plugin for showing host availability
#!/usr/local/bin/python3
import os
hosts = [
'google.com',
'microsoft.com'
]
header = []
@noahcoad
noahcoad / yaml2json.py
Last active December 27, 2019 22:46
Python to Convert yaml to json
# convert yaml to json
# pip3 install pyyaml
# http://pyyaml.org/wiki/PyYAMLDocumentation
# py3 yaml2json.py < ~/code/manpow/homeland/heartland/puphpet/config.yaml
# gist https://gist.github.com/noahcoad/51934724e0896184a2340217b383af73
import yaml, json, sys
sys.stdout.write(json.dumps(yaml.load(sys.stdin), sort_keys=True, indent=2))
@basmussen
basmussen / install_jenkins_plugins.sh
Created December 30, 2013 14:36
Install Jenkins plugins
#!/bin/bash
host=http://localhost:8080
url=/pluginManager/installNecessaryPlugins
# git plugin https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin
curl -X POST -d '<jenkins><install plugin="git@2.0" /></jenkins>' --header 'Content-Type: text/xml' $host$url
# artifactory plugin https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin
curl -X POST -d '<jenkins><install plugin="artifactory@2.2.1" /></jenkins>' --header 'Content-Type: text/xml' $host$url
@jitpack-io
jitpack-io / init.gradle
Created December 7, 2015 13:29
JitPack repository in Gradle
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.artifacts.dsl.RepositoryHandler
apply plugin:JitPackRepositoryPlugin
class JitPackRepositoryPlugin implements Plugin<Gradle> {
void apply(Gradle gradle) {
@fredrick
fredrick / ema.wilder.iterative.js
Created January 12, 2012 21:58
Node.JS + v8 profiling
Array = require('gauss').Vector;
var prices = [22.2734, 22.194, 22.0847, 22.1741, 22.184, 22.1344,
22.2337, 22.4323, 22.2436, 22.2933, 22.1542, 22.3926,
22.3816, 22.6109, 23.3558, 24.0519, 23.753, 23.8324,
23.9516, 23.6338, 23.8225, 23.8722, 23.6537, 23.187,
23.0976, 23.326, 22.6805, 23.0976, 22.4025, 22.1725];
/* Use Wilder ratio on an exponential moving average period of 10,
1 million iterations
@yuki-takei
yuki-takei / keybindings.json
Last active August 22, 2021 06:23 — forked from bpedman/keybindings.json
Visual Studio Code - Eclipse Keybindings (Win, Linux)
[
{
"key": "ctrl+d",
"command": "editor.action.cutLines",
"when": "editorTextFocus"
},
{
"key": "ctrl+o",
"command": "workbench.action.gotoSymbol"
},
<!-- policy references JWT issuer's signing key modulus (n) and exponent (e) values in line -->
<validate-jwt header-name="Authorization">
<issuer-signing-keys>
<key e="AQAB" n="pO2+BpARfKknqyr8sDRG1VmLlw5gBv518n2/LVyh16lMg2YUmDAmJCRX0BJQl0LytR5FIK0PTFDWAofguReR4OiLzQjiwKt9yFrnyslSYy74Ux4AdvkqC2Rv+nJ7NYaLIF3e/+gYrdK0buxpqZq+Hlh6Qugc/pYnxgODT59UllNGbKWVW3tlLxyxhj2KwzWpruhh/ECS1dq487u0ZAwgNPJw05Ku0ZMt9PET35Z4kr295ugxZl/nfdnfqu3lFBtbIoegtc2Rsok8YW0q91PeHOWMSu1B6PK4oZnEe3lcHRvCQzijG1SvBAAAzRdNZ6lgHsXS9XWyk/FyMcUhqImwOPOAzRtSUoDTafuBiefmB1+Rm1ypUM3PJxOrCP3qfImTmlmPE5AFMzg+oZqyUlh/kodWrfvIn2BbQ2BLWywghcUvUV1U6ipqNKh2D9Tg0853hO1KBOKcX2BJCZkr5zjg7NaYLC4nl/nn8DVqcjxoNghsH+a6IzwoPkcz/yAB8KmsNmCO9Ru9bjgl7xMbuAWAWVQqC4QY7VFYTW8W7Inc0e97mU4CJ5zwPw2DiVpjQD0anAWY1L+k61FCi93NKYhIQLw44ijIXbCdLaXjKxXu8FEkFW3hi1duxEIgqHve5TfHTddWi2xjVfl8X8vH4rDJIniBlQYeNVe/PvTRqjTHr2E="></key>
</issuer-signing-keys>
</validate-jwt>
@thaJeztah
thaJeztah / README.md
Last active December 12, 2021 00:05
Docker Changelog CLI plugin

Docker Changelog CLI plugin

Based on a tweet by @Tomwillfixit

Just a quick fun conversion to make it work as a Docker CLI plugin

To use it (assuming you're running a beta of Docker 19.03):

@razbomi
razbomi / gulpfile.js
Created November 16, 2016 23:19
Gulp pipe function
'use strict';
var gulp = require('gulp');
var through = require('through2');
// https://gulp.readme.io/docs
gulp.task('default', () => {
gulp.src('src/**/*')
.pipe(pipeFunction())
.pipe(gulp.dest('dist'))