Skip to content

Instantly share code, notes, and snippets.

Anders Ingemann andsens

Block or report user

Report or block andsens

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@andsens
andsens / naval_fate.sh
Created Jul 29, 2019
Demonstration of docopt.sh
View naval_fate.sh
#!/usr/bin/env bash
DOC="Naval Fate.
Usage:
naval_fate.sh ship <name> move <x> <y> [--speed=<kn>]
naval_fate.sh ship shoot <x> <y>
Options:
--speed=<kn> Speed in knots [default: 10].
@andsens
andsens / Dockerfile
Last active Jun 6, 2019
Kibana docker container with pre-optimized bundles
View Dockerfile
ARG KIBANA_VERSION
FROM docker.elastic.co/kibana/kibana:${KIBANA_VERSION}
ARG KIBANA_VERSION
ARG LOGTRAIL_VERSION
USER root
RUN NODE_OPTIONS="--max_old_space_size=4096" kibana-plugin install https://github.com/sivasamyk/logtrail/releases/download/v${LOGTRAIL_VERSION}/logtrail-${KIBANA_VERSION}-${LOGTRAIL_VERSION}.zip
COPY kibana.yaml /usr/share/kibana/config/kibana.yml
COPY elasticsearch.repo /etc/yum.repos.d/elasticsearch.repo
@andsens
andsens / skaffold.log
Created Mar 8, 2019
skaffold deploy debug output
View skaffold.log
INFO[0000] Skaffold &{Version:v0.24.0 ConfigVersion:skaffold/v1beta6 GitVersion: GitCommit:6a829c4b29e3a102b0b14c4584cd174f780402e9 GitTreeState:clean BuildDate:2019-03-01T20:36:32Z GoVersion:go1.12 Compiler:gc Platform:darwin/amd64}
DEBU[0000] Defaulting build type to local build
INFO[0000] no config entry found for kube-context ops.orbit.dev
INFO[0000] Using kubectl context: ops.orbit.dev
INFO[0000] no config entry found for kube-context ops.orbit.dev
DEBU[0000] Using builder: local
DEBU[0000] setting Docker user agent to skaffold-v0.24.0
INFO[0000] no config entry found for kube-context ops.orbit.dev
DEBU[0000] push value not present, defaulting to true because localCluster is false
Starting build...
@andsens
andsens / crd.yaml
Created Mar 6, 2019
skaffold reproduce
View crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: certificates.certmanager.k8s.io
spec:
additionalPrinterColumns:
- JSONPath: .status.conditions[?(@.type==\"Ready\")].status
@andsens
andsens / Corefile
Last active Feb 12, 2019
Minikube DNS addon
View Corefile
.:53 {
cache 30
log
errors
prometheus
etcd k8s {
stubzones
endpoint http://etcd:2379
}
}
@andsens
andsens / npm-list-pkg-lock.json
Last active Sep 8, 2017
`npm list --json` when package-lock.json is absent and present
View npm-list-pkg-lock.json
npm list --json
{
"name": "@secoya/rabbitmq-tools",
"version": "0.1.8",
"problems": [
"missing: amqplib@0.4.2, required by @secoya/rabbitmq-tools@0.1.8",
"missing: babel-runtime@6.9.2, required by @secoya/rabbitmq-tools@0.1.8",
"missing: bitsyntax@0.0.4, required by amqplib@0.4.2",
"missing: buffer-more-ints@0.0.2, required by amqplib@0.4.2",
"missing: readable-stream@1.1.14, required by amqplib@0.4.2",
@andsens
andsens / merge-repo-to-subdir.sh
Created Jul 15, 2017
Merges a repo into a subdirectory of another repo (useful when making a submodule part of a parent repo)
View merge-repo-to-subdir.sh
#!/bin/bash -e
function merge_repo_to_subdir {
local url=$1
local commit=$2
local module_path=$3
if [[ -z $url || -z $commit || -z $module_path ]]; then
echo "Usage: merge-repo-to-subdir.sh URL BRANCH PATH" >&2
exit 1
View .gitconfig
[log]
date = relative
[format]
pretty = shortlog
[pretty]
shortlog = format:%C(auto,yellow)%h%C(auto,magenta)% G? %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(7,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D
View github_push_error.log
Counting objects: 5, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 464 bytes | 0 bytes/s, done.
Total 5 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
remote: ruby-jemalloc: symbol lookup error: /data/github/current/vendor/gems/2.1.7/ruby/2.1.0/gems/json-1.8.3/lib/json/ext/generator.so: undefined symbol: rb_data_typed_object_alloc
To git@github.com:user/repo
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@github.com:user/repo'
@andsens
andsens / ec2-jessie-ebs.log
Created Mar 30, 2016
Log of running `bootstrap-vz --dry-run manifests/official/ec2/ebs-jessie-amd64-hvm.yml --log - --debug`
View ec2-jessie-ebs.log
Loading provider ec2
Loading plugin cloud_init
Tasklist:
bootstrapvz.providers.ec2.tasks.packages.DefaultPackages
bootstrapvz.providers.ec2.tasks.host.AddExternalCommands
bootstrapvz.common.tasks.bootstrap.AddRequiredCommands
bootstrapvz.common.tasks.locale.LocaleBootstrapPackage
bootstrapvz.providers.ec2.tasks.host.GetInstanceMetadata
bootstrapvz.common.tasks.apt.AddDefaultSources
bootstrapvz.plugins.cloud_init.tasks.AddCloudInitPackages
You can’t perform that action at this time.