Skip to content

Instantly share code, notes, and snippets.

@pmoranga
pmoranga / README.md
Last active April 8, 2020 07:18 — forked from blackjid/README.md
Raspberry pi dashboard rpi screens

Raspberry pi dashboard

This is what we did to setup a few dashboards at platanus

You'll need

  • Raspberry Pi
  • Dashing Service
  • Wifi stick (optional)
<koken:if true="settings.albums_index_show_title">
<h4>
<koken:load style="margin-left: 0.2em;">
{{ album.title }} <!-- Prints SET title -->
</koken:load>
</h4>
<p>Work
<koken:load>
@pmoranga
pmoranga / Vagrantfile
Created September 28, 2015 21:23 — forked from johnpbloch/Vagrantfile
Puppet awesomesauce for Vagrant
config.vm.provision :puppet do |puppet|
# Add a folder in your root named .ppt
puppet.manifests_path = ".ppt/manifests"
# vagrant.pp is your main manifest and goes in .ppt/manifests
puppet.manifest_file = "vagrant.pp"
# Add puppet modules in .ppt/modules as git submodules; they will be pre-installed in Vagrant this way
puppet.module_path = ".ppt/modules"
# Config files, etc. go in .ppt/files. fileserver.conf (see below) defines the path for puppet to add
# when looking for files. That way, you can reference files with puppet:// protocols. Make sure you
# add the directory defined in fileserver.conf as a shared directory in the main Vagrantfile config
@pmoranga
pmoranga / $conf_dir puppet.conf
Created February 13, 2016 21:30 — forked from abhishekkr/$conf_dir puppet.conf
Puppet Module : No Code In Data ~ using PuppetDB in masterless puppet
[main]
storeconfigs = true
storeconfigs_backend = puppetdb
reports = store,puppetdb
pluginsync = true
@pmoranga
pmoranga / gist:2db7b5d1e0c120a7de70
Created February 15, 2016 23:46
Puppet external fact for EC2 Tags
#!/bin/bash
region=`facter ec2_placement_availability_zone | sed 's/[a-z]$//g'`
instanceId=`facter ec2_instance_id`
/usr/bin/aws ec2 describe-tags --filters "Name=resource-id,Values=${instanceId}" --region ${region} | jq '.Tags[] | "ec2_tag_" + .Key + "=" + .Value' | tr [:upper:] [:lower:] | tr -d '"'
exit 0
@pmoranga
pmoranga / ec2tags.rb
Last active February 16, 2016 22:30 — forked from tmclaugh/ec2tags.rb
require 'facter'
require 'aws-sdk'
if Facter.value("ec2_instance_id") != nil
instance_id = Facter.value("ec2_instance_id")
region = Facter.value("ec2_placement_availability_zone")[0..-2]
ec2 = Aws::EC2::Client.new(region:region)
tags = ec2.describe_tags(filters: [{ name: "resource-id", values: [instance_id] }]).tags
tags.each do |tag|
fact = "ec2_tag_#{tag["key"].gsub(/\-|\/|:/, '_')}"
@pmoranga
pmoranga / raspisys.php
Last active May 16, 2016 20:31
Forked Raspberry Pi System Information PHP Script - Mobile Friendly Version and Misc Tweaks
<?php
// Original Gist By: Jan van Haarst
// Original Gist: https://gist.github.com/4388108
// Forked Gist By: Jon Faviell
// Forked Gist: https://gist.github.com/7e9138acb3975f8d886c
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
@pmoranga
pmoranga / .bash-colors
Created May 30, 2016 19:08 — forked from jaycody/.bash-colors
.bash-colors
txtblk='\e[0;30m' # Black - Regular
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue
txtpur='\e[0;35m' # Purple
txtcyn='\e[0;36m' # Cyan
txtwht='\e[0;37m' # White
@pmoranga
pmoranga / mass-aggregation-change.sh
Created May 31, 2016 13:19 — forked from kirbysayshi/mass-aggregation-change.sh
quick examples of how to change many many wsp (graphite/whisper) files settings
for f in $(find $1 -iname "*.wsp"); do
if [ -a $f ];
then /opt/graphite/bin/whisper-set-aggregation-method.py $f max;
fi;
done
@pmoranga
pmoranga / cloud-config.yml
Created October 13, 2016 14:36 — forked from robeastham/cloud-config.yml
This is a cloud-config file template for Rancher OS. Fill in the blanks and it'll automatically setup your Rancher Server behind an Nginx proxy and register Let's Encrypt SSL certs and then renew them automatically
#cloud-config
ssh_authorized_keys:
- ssh-rsa <my-public-key>
rancher:
services:
nginx-proxy:
image: jwilder/nginx-proxy:0.4.0
restart: unless-stopped
ports:
- "80:80"