Skip to content

Instantly share code, notes, and snippets.

View sjourdan's full-sized avatar

Stephane Jourdan sjourdan

View GitHub Profile
@guilhem
guilhem / QCM.md
Last active November 19, 2023 10:57
Questions pour évaluer au DevOps (2023)

What was a key aspect of the origin story of DevOps? a) The invention of the internet. b) The widespread adoption of cloud computing. c) A secret society of developers and operations staff. d) The discovery of coffee as a productivity booster.

When was the Agile Manifesto first introduced? A) 1999 B) 2001 C) 2005

@jezhumble
jezhumble / inventory_vpcs.py
Last active October 9, 2019 05:52
List EC2, RDS and ElastiCache instances, grouped by VPC
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse, sys, boto3
from colorama import Fore, Style
def count(my_list, my_key):
if my_key not in my_list:
return '0'
else:
#!/bin/bash
# Expects Ubuntu 16.06 (xenial) and kernel 4.x.
# Based upon a blog post by Zach at http://zachzimm.com/blog/?p=191
set -eux
# Have the user call sudo early so the credentials is valid later on
sudo whoami
@dm0-
dm0- / user_data.yml
Created July 18, 2016 21:25
The nightmare config for a CoreOS workstation (messy, unsafe, and wildly incomplete)
#cloud-config
hostname: "set-this"
coreos:
update:
reboot-strategy: "off"
units:
- name: "default.target"
command: "start"
@pierrebeaucamp
pierrebeaucamp / LeanCanvas.md
Created November 12, 2015 04:05
A Lean Canvas in markdown

Lean Canvas

The Lean Canvas is a version of the Business Model Canvas adapted by Ash Maurya specifically for startups. You can read more about it here.

Problem

Top 3 Problems

@skomma
skomma / docker-compose
Last active November 20, 2018 11:19
docker-compose upstart template init file
# This file is the template of an upstart init script for using docker-compose
#
# Usage:
# 1. place docker-compose yaml file (ex. rhodecode/docker-compose.yaml)
# 2. run the following lines.
# # ln -s docker-compose docker-compose_rhodecode.conf
# # initctl reload-configuration
# # start docker-compose_rhodecode
#
# Edit CONF_BASE_DIR if you want to change the location of docker-compose configuration file.
@sjourdan
sjourdan / The Operations Report Card.md
Last active December 24, 2023 16:35
The Operations Report Card

The Operations Report Card

Source: http://www.opsreportcard.com/.

Public Facing Practices

  1. Are user requests tracked via a ticket system?
  2. Are "the 3 empowering policies" defined and published?
  3. Does the team record monthly metrics?
@dysinger
dysinger / easy-ubuntu-openvpn.sh
Created August 28, 2013 18:22
Create a VPN on EC2 in 30 seconds
#!/bin/sh
# linux firewall/forwarding
modprobe iptable_nat
echo 1 | tee /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 10.10.10.1/2 -o eth0 -j MASQUERADE
# install openvpn
apt-get update && apt-get install -y openvpn
cd /etc/openvpn/
INSTANCE=$(curl http://169.254.169.254/latest/meta-data/public-hostname)
openvpn --genkey --secret ${INSTANCE}.key
@fracasula
fracasula / getMp3StreamTitle.php
Last active April 24, 2024 00:38
How to get the MP3 metadata (StreamTitle) from a streaming URL
<?php
/**
* Please be aware. This gist requires at least PHP 5.4 to run correctly.
* Otherwise consider downgrading the $opts array code to the classic "array" syntax.
*/
function getMp3StreamTitle($streamingUrl, $interval, $offset = 0, $headers = true)
{
$needle = 'StreamTitle=';
$ua = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36';
@rottenbytes
rottenbytes / graphdeps.rb
Created September 6, 2011 07:23
Graph your cookbooks deps
#!/usr/bin/env ruby
cbdir=ARGV[0]
output = "./deps.dot"
puts "Running on #{cbdir}..."
cb_meta = Dir.glob("#{cbdir}/*/metadata.rb")
fp=File.open(output,"w")