Skip to content

Instantly share code, notes, and snippets.

View moertel's full-sized avatar
🦜
Deploying canaries

Stefanie Grunwald moertel

🦜
Deploying canaries
View GitHub Profile
"""
Note: There are several variations to do the same thing (see # or). The idea
is to choose the best (one or so) of the variations and implement that. I.E.
these are different designs possibilities for the API.
"""
"""
Filtering
"""
@sebradloff
sebradloff / Dockerfile-airflow
Created April 17, 2018 21:19
Airflow MesosExecutor dockerized workflow
# REFERENCES:
# - https://github.com/puckel/docker-airflow
# - https://github.com/ImDarrenG/mesos-framework-dev/blob/master/Dockerfile
# - https://github.com/Stibbons/docker-airflow-mesos
# Wherever you store your mesos image built from Dockerfile-mesos
FROM slicelife/mesos:1.4.0 as mesos
FROM ubuntu:16.04
# Never prompts the user for choices on installation/configuration of packages
ENV DEBIAN_FRONTEND noninteractive
@anvk
anvk / psql_useful_stat_queries.sql
Last active April 23, 2024 03:15
List of some useful Stat Queries for PSQL
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB.
------------
-- Basics --
------------
-- Get indexes of tables
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 26, 2024 16:33 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@so0k
so0k / kubectl.md
Last active April 25, 2024 12:40
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@Faheetah
Faheetah / Jenkinsfile.groovy
Last active March 6, 2024 18:14
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
{
"id": "marathon-lb-autoscale",
"args":[
"--marathon", "http://leader.mesos:8080",
"--haproxy", "http://marathon-lb.marathon.mesos:9090",
"--target-rps", "100",
"--apps", "nginx_10000"
],
"cpus": 0.1,
"mem": 16.0,
import jenkins.model.*
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.common.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.plugins.credentials.impl.*
import com.cloudbees.jenkins.plugins.sshcredentials.impl.*
import org.jenkinsci.plugins.plaincredentials.*
import org.jenkinsci.plugins.plaincredentials.impl.*
import hudson.util.Secret
import hudson.plugins.sshslaves.*
@betamax
betamax / apib2httpsnippets
Created June 19, 2015 12:27
A ruby script to convert an HTTP blueprint JSON file into multiple HAR files and then convert those HAR files in to code snippets using httpsnippet
#!/usr/bin/env ruby
# ./apib2httpsnippets
# Author: Max Novakovic
# Email: max@lateral.io
require 'awesome_print'
require 'json'
require 'fileutils'
require 'uri'
@betamax
betamax / generate-docs.sh
Created June 19, 2015 10:53
A script that we use at Lateral to generate our documentation
#!/bin/sh
# Which md files to compile
declare -a arr=("hybrid-recommender" "text-matching" "pre-populated-recommenders")
# Now loop through the above array
for i in "${arr[@]}"
do
# Where to store the documentation