This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Party Parrot adapted to DeskPi PicoMate | |
# from https://learn.adafruit.com/iot-twitter-listener-party-parrot/coding-the-iot-party-parrot | |
import os, microcontroller, board, time | |
import busio, digitalio, displayio, rotaryio, terminalio, asyncio | |
import adafruit_imageload | |
from adafruit_display_text import label | |
import adafruit_displayio_ssd1306 | |
from adafruit_ssd1306 import SSD1306_I2C |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python | |
# Convert mtr json logs to a csv report for graphing | |
# Collect data intermittently from mtr with: | |
# while true; do mtr -j 8.8.8.8 > mtr_$(date +'%Y-%m-%d_%H:%M:%S').json; sleep 30; done | |
import os,datetime | |
import glob | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import argparse | |
import re | |
parser = argparse.ArgumentParser( | |
description = "netstat output files to graph" | |
) | |
parser.add_argument('--inputs', nargs='*') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.3' | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.4.2 | |
ports: | |
- target: 9200 | |
published: 9200 | |
protocol: tcp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- set_fact: | |
cf_stack_name: "{{ item }}" | |
- name: Delete cloudformation for {{ cf_stack_name }} | |
include: cf_delete.yml | |
# heh, careful with this | |
when: ( cf_stack_name in cf_stack_names_to_delete ) | |
tags: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#user nobody; | |
worker_processes auto; | |
#error_log logs/error.log; | |
error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#error_log logs/error.log debug; | |
#pid logs/nginx.pid; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#TODO.md | |
if [ "$1" = "-v" ]; then | |
ANSIBLE_VERSION="${2}" | |
fi | |
yum_makecache_retry() { | |
tries=0 | |
until [ $tries -ge 5 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* from http://notbrainsurgery.livejournal.com/38622.html?page=1 */ | |
/* To compile on debian/ubuntu : | |
sudo apt-get install gcc pkgconf libusb-1.0-0-dev | |
gcc armedge.c `pkg-config --libs --cflags libusb-1.0` -o armedge | |
*/ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <sys/types.h> | |
#include <string.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS1=$'\[\033[01;36;44m\]# $( EC=$?; [ $EC -eq 0 ] && echo -n "\[\033[01;32;44m\]Exit:$EC" || echo -n "\[\033[00;31;44m\]Exit:$EC" ) \ | |
\[\033[00;37;44m\]$(date +%Y-%m-%d\ %H:%M:%S) \[\033[01;34;49m\] \ | |
\[\033[01;30;49m\][\[\033[00;35;49m\]\u\[\033[01;30;49m\]@\[\033[01;34;49m\]\h\[\033[01;30;49m\]:\ | |
\[\033[00;33;49m\]\w\[\033[00;36;49m\]\[\033[01;30;49m\]]\[\033[01;34;49m\]\n\ | |
\[\033[01;36;49m\]\$\[\033[01;30;49m\](: !\! )\[\033[00;00;00m\] ' | |
# If this is an xterm set the title to user@host:dir | |
case "$TERM" in | |
xterm*|rxvt*) | |
PS1="\[\e]0;\W\a\]$PS1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## loosely based on https://github.com/miketheman/knife-role-spaghetti | |
require 'graphviz' # gem install graphviz | |
config = {} | |
# 'png' is easier to view | |
# 'svg' is smaller / faster / searchable | |
config[:graphformat] = 'png' | |
# false is faster and more organized/orthogonal | |
config[:neatograph] = false |
NewerOlder