Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
H=${1:-rpi.example.com}
flash --hostname ${H} --userdata rpi-boot-wifi.yaml https://github.com/hypriot/image-builder-rpi/releases/download/v1.11.5/hypriotos-rpi-v1.11.5.img.zip
@pmoranga
pmoranga / k8s-pi.md
Created December 22, 2019 21:09 — forked from ljfranklin/k8s-pi.md
@pmoranga
pmoranga / aws-check-reserved-instances.py
Last active November 20, 2021 19:03
AWS Reserved Report
#!/usr/bin/env python3
import boto3
import warnings
warnings.filterwarnings('ignore', category=UnicodeWarning)
def get_count_reserved_by_family_base(instances,instance_type,platform):
item = {}
total = 0
@pmoranga
pmoranga / exim.conf
Created October 30, 2018 14:54
Exim4 multiple hosts on dc_smarthost
dc_smarthost="mail.myhome.com:mail.mysecondsmtp.com"
# try in order until it succeeds
version: '2.1'
services:
grafana:
container_name: grafana
image: raymondmm/grafana
ports:
- 3000:3000
volumes:
- /opt/grafana:/etc/grafana:rw
- /opt/grafana:/var/lib/grafana:rw
version: '3'
services:
portainer:
container_name: portainer
image: portainer/portainer
volumes:
- /srv/docker/portainer:/data
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "9000:9000"

Keybase proof

I hereby claim:

  • I am pmoranga on github.
  • I am moranga (https://keybase.io/moranga) on keybase.
  • I have a public key whose fingerprint is 8ECA D4AD E04E 1CEC 7F6C EE50 0B88 12D1 17EE E862

To claim this, I am signing this object:

@pmoranga
pmoranga / 00-set-authorization.groovy
Created November 27, 2017 10:38 — forked from xbeta/00-set-authorization.groovy
put them in $JENKINS_HOME/init.groovy.d/
import jenkins.model.*;
import hudson.security.*;
// JVM did not like 'hypen' in the class name, it will crap out saying it is
// illegal class name.
class BuildPermission {
static buildNewAccessList(userOrGroup, permissions) {
def newPermissionsMap = [:]
permissions.each {
newPermissionsMap.put(Permission.fromId(it), userOrGroup)
@pmoranga
pmoranga / docker-compose.yaml
Created November 14, 2017 11:28 — forked from DennyLoko/docker-compose.yaml
TICK stack config
version: "2"
services:
telegraf:
container_name: telegraf
image: mjenz/rpi-telegraf:alpine
restart: always
network_mode: host
pid: host
depends_on:
- influxdb
@pmoranga
pmoranga / README.md
Created September 13, 2017 09:10 — forked from blech75/README.md
vagrant_local_status - bash function to display name and status of vagrant machine (for use in PS1)

Vagrant Status in Your Shell Prompt

vagrant_local_status is a Bash function that returns the name and status the relevant Vagrant machine for the current directory.

The primary use case is in your PS1 environment variable, so the status of your current project's Vagrant machine is always visible at every shell prompt. Here's an example of my Bash prompt in a test project dir:

[01:29 PM]-[1506]-[justin@justin]-[~/projects/test]-[dev u= bb/dev @d59dc2d]-[vagrant:poweroff]
$

(vagrant:poweroff is the output of vagrant_local_status)