Skip to content

Instantly share code, notes, and snippets.

Avatar

Love Billingskog Nyberg jacksoncage

View GitHub Profile
View why-i'm-leaving-kubernetes-for-swarm.md

I have been an aggressive Kubernetes evangelist over the last few years. It has been the hammer with which I have approached almost all my deployments, and the one tool I have mentioned (shoved down clients throats) in almost all my foremost communications with clients, and it was my go to choice when I was mocking my first startup (saharacluster.com).

A few weeks ago Docker 1.13 was released and I was tasked with replicating a client's Kubernetes deployment on Swarm, more specifically testing running compose on Swarm.

And it was a dream!

All our apps were already dockerised and all I had to do was make a few modificatons to an existing compose file that I had used for testing before prior said deployment on Kubernetes.

And, with the ease with which I was able to expose our endpoints, manage volumes, handle networking, deploy and tear down the setup. I in all honesty see no reason to not use Swarm. No mission-critical feature, or incredibly convenient really nice to have feature in Kubernetes that I'm go

@mshmsh5000
mshmsh5000 / geoip-headers.vcl
Last active Aug 7, 2018
Fastly GeoIP header injection
View geoip-headers.vcl
# Request headers
sub vcl_recv {
set req.http.X-Fastly-Country-Code = geoip.country_code;
set req.http.X-Fastly-Country-Name = geoip.country_name;
set req.http.X-Fastly-City = geoip.city;
set req.http.X-Fastly-Latitude = geoip.latitude;
set req.http.X-Fastly-Longitude = geoip.longitude;
set req.http.X-Fastly-Region = geoip.region;
#FASTLY recv
@bmaupin
bmaupin / build-openssl.sh
Last active Oct 19, 2021
Build openssl (with SSLv2/3 support for security testing)
View build-openssl.sh
#!/bin/bash
# Cache sudo password
sudo -v
# Get latest OpenSSL 1.0.2 version from https://openssl.org/source/
# v1.1.0 seems to have removed SSLv2/3 support
openssl_version=1.0.2k
# Install build dependencies
@kennwhite
kennwhite / vpn_psk_bingo.md
Last active Jun 28, 2022
Most VPN Services are Terrible
View vpn_psk_bingo.md

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016

@whiteinge
whiteinge / process_status_updates.sls
Last active Oct 3, 2021
POC for writing status updates to a sqlite db. Updates are written using an Orchestrate file. The Orchestrate file can be called via the Reactor.
View process_status_updates.sls
{# Place this file in /srv/reactor/process_status_updates.sls
Call via sending a custom event on a minion as:
salt-call event.send myco/external_task/status_update task=foo status='Update number one!'
Requires reactor config such as:
reactor:
- 'myco/external_task/status_update':
- /srv/reactor/process_status_updates.sls
@acolyer
acolyer / service-checklist.md
Last active Jun 11, 2022
Internet Scale Services Checklist
View service-checklist.md

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@jfrost
jfrost / gist:8798108
Created Feb 4, 2014
Basic Saltstack mine.get example
View gist:8798108
# This jinja template will demonstrate what grains are available from other nodes via salt's mine.get function
{% for host, data in salt['mine.get']('*', 'grains.items', expr_form = 'glob').items() -%}
{% for key, value in data.items() -%}
{{ host }} - {{ key }}: {{ value }}
{% endfor -%}
{% endfor -%}
@danriti
danriti / hipchat-v2.sh
Last active Jul 19, 2021
HipChat API v2 - Send a message to a room using cURL
View hipchat-v2.sh
#!/bin/bash
# Set the ROOM_ID & AUTH_TOKEN variables below.
# Further instructions at https://www.hipchat.com/docs/apiv2/auth
ROOM_ID=XXX
AUTH_TOKEN=XXX
MESSAGE="Hello world!"
curl -H "Content-Type: application/json" \
@wsargent
wsargent / docker_cheat.md
Last active Jul 1, 2022
Docker cheat sheet
View docker_cheat.md
@djonsson
djonsson / darcula.css
Created Sep 5, 2013
Darcula theme for jsonview (google chrome plugin)
View darcula.css
body {
white-space: pre;
font-family: monospace;
background: #393939;
color: #b5c4d0;
}
.property {
}