Skip to content

Instantly share code, notes, and snippets.

View ggiamarchi's full-sized avatar

Guillaume Giamarchi ggiamarchi

View GitHub Profile
@ggiamarchi
ggiamarchi / windmill-inband-dcmi-setup.sh
Created May 23, 2017 13:27
Install kernel modules and freeipmi tools for in-band management on OCP Windmill servers (for linux kernel < 3.19)
#!/bin/bash
#
# Description : Install kernel modules and freeipmi tools for in-band management on OCP Windmill servers
# (for linux kernel < 3.19). Tested on GRML 2014.11 (kernel 3.16.0-1-grml-amd64)
# Author : Guillaume Giamarchi <guillaume.giamarchi@gmail.com>
# Date : May 23rd, 2017
#
set -ex
@ggiamarchi
ggiamarchi / dump-amibios.sh
Last active January 5, 2019 15:04
Dump AMI BIOS on a system running Ubuntu 16.04
#!/bin/bash
set -ex
if [ "$(whoami)" != "root" ] ; then
echo "Error : You must be root"
exit 1
fi
apt update
@ggiamarchi
ggiamarchi / rpi-update
Last active April 3, 2017 21:07
rpi-update debug
#!/bin/bash
set -x
set -o nounset
set -o errexit
REPO_URI=${REPO_URI:-"https://github.com/Hexxeh/rpi-firmware"}
UPDATE_SELF=${UPDATE_SELF:-1}
@ggiamarchi
ggiamarchi / Vagrantfile
Created April 6, 2016 09:19
Example of fail2ban util with apache HTTP server
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<SCRIPT
set -ex
apt-get update
apt-get install -y apache2 fail2ban
cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.conf.bak
@ggiamarchi
ggiamarchi / devstack.sh
Last active April 24, 2017 14:12
devstack
#!/bin/bash
set -ex
#
# The network interface that will be used by OpenStack services.
# The IP address of this interface will be used in the service
# catalog for admin and internal endpoints.
#
net_interface=eth0
@ggiamarchi
ggiamarchi / main.go
Last active August 29, 2015 14:14
Terraform sample provider
package main
import (
"github.com/hashicorp/terraform/builtin/providers/test"
"github.com/hashicorp/terraform/plugin"
)
func main() {
plugin.Serve(&plugin.ServeOpts{
ProviderFunc: test.Provider,