Skip to content

Instantly share code, notes, and snippets.

View ppouliot's full-sized avatar

Peter Pouliot ppouliot

  • Ampere Computing
  • Boston, MA
View GitHub Profile
@ppouliot
ppouliot / setFans.sh
Created February 19, 2020 21:25
Script to set the fan speed on Ampere server
#! /bin/sh
logo () {
echo ""
echo " ▄██▄"
echo " ▄█ █▄"
echo " ▄█ █▄"
echo " ▄▄▄▄█ ▄▄▄ █▄"
echo " ▄█▀▀▀ ▄█ ▀██▄"
echo " ▄█▀ ▄█ ▀█▄"
# Preseed for ubuntu-16.04-amd64
# Dell R630
# Peter Pouliot <peter@pouliot.net>
#
d-i debian-installer/locale select en_US.UTF-8
d-i localechooser/supported-locales multiselect en_US.UTF-8
d-i localechooser/countrylist/North_America select US
d-i debian-installer/splash boolean false
d-i console-setup/ask_detect boolean false
@ppouliot
ppouliot / i.pxe
Created March 30, 2018 22:26 — forked from john-clark/i.pxe
ipxe php boot system
#!ipxe
#
# This file gets compiled into undionly.kpxe
################################################################
:vars
set next-server 192.168.2.121
cpuid --ext 29 && set arch amd64 || set arch x86
:netconfig
dhcp net0 || goto ipxeshell
:prompt
@ppouliot
ppouliot / user_data.sh
Created June 7, 2017 19:17
Custom IP Resolution with Cloud-Config
#!/bin/sh
workdir=$(mktemp --directory)
trap "rm --force --recursive ${workdir}" SIGINT SIGTERM EXIT
cat >"${workdir}/cloud-config.yml" <<EOF
#cloud-config
coreos:
etcd:
@ppouliot
ppouliot / certs.sh
Created June 7, 2017 18:46 — forked from jameskyle/certs.sh
Generating CA, Server, & Client Certificates
#!/bin/bash
###############################################################################
# NOTICE: This script is intended to be used in conjunction with a openssl.cnf
# template such as this one:
# https://gist.github.com/jameskyle/8106d4d5c6dfa5395cef
# (C) Copyright 2014 James A. Kyle.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ppouliot
ppouliot / rPi3-mariadb-10.1.sh
Created May 22, 2017 15:16 — forked from Lewiscowles1986/rPi3-mariadb-10.1.sh
Raspberry Pi MariaDB 10.1 with Galera Cluster build
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi
echo "deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi" > /etc/apt/sources.list.d/stretch.list
echo "APT::Default-Release \"jessie\";" > /etc/apt/apt.conf.d/99-default-release
@ppouliot
ppouliot / root.yml
Last active April 2, 2017 05:38 — forked from raugustinus/cloud-config-static-ip.yml
coreos cloud-config static ip address with docker remote API
#cloud-config
ssh_authorized_keys:
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKetw3EOkjAc3+QuDbumo1GovGzCZbQ7McDDFPyis779 peter@quartermaster"
@ppouliot
ppouliot / cloud-config.yml
Created March 30, 2017 02:24 — forked from lrvick/cloud-config.yml
Example Cloud Config for running CoreOS Enterprise + Build Worker on CoreOS/AWS
#cloud-config
coreos:
etcd:
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
fleet:
public-ip: $private_ipv4
update:
reboot-strategy: off
@ppouliot
ppouliot / cloud-config.yaml
Created March 30, 2017 02:24 — forked from popsikle/cloud-config.yaml
docker_opts cloud config
#cloud-config
coreos:
units:
- name: docker.service
command: restart
content: |
[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.com