Skip to content

Instantly share code, notes, and snippets.

View gjmf's full-sized avatar

Graham Freeman gjmf

View GitHub Profile
@patcable
patcable / org.homebrew.ssh-agent-logging.plist
Last active March 30, 2017 20:58
homebrew ssh-agent w/ opensc
<!-- this is the plist with stdout/stderr logging enabled if you need it.
scroll down for the one without it. also remove this when you
copy and paste -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.homebrew.ssh-agent</string>
<key>ProgramArguments</key>
@maxvt
maxvt / infra-secret-management-overview.md
Last active February 28, 2024 20:53
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

@DavidWittman
DavidWittman / audit_iam_accounts.py
Created April 14, 2016 22:34
Parses the output from AWS credential reports and displays users which have been inactive for 60+ days.
#!/usr/bin/env python
# Parses the output from AWS credential reports and displays
# users which have been inactive for 60+ days.
#
# Usage:
# audit_iam_accounts.py credential_report.csv <days>
#
import csv
@stympy
stympy / helpscout-export.rb
Last active June 28, 2023 16:44
Script to export helpscout data
#!/usr/bin/env ruby
require 'helpscout'
require 'fileutils'
api_key = ARGV[0]
helpscout = HelpScout::Client.new(api_key)
helpscout.mailboxes.each do |box|
FileUtils.mkdir(box.name) unless File.exists?(box.name)
puts "Fetching #{helpscout.conversation_count(box.id, 'all', nil)} conversations for #{box.name}"
@vgeshel
vgeshel / function.js
Last active February 9, 2022 09:19
AWS Lambda function for forwarding SNS notifications to Slack
console.log('Loading function');
const https = require('https');
const url = require('url');
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration
const slack_url = 'https://hooks.slack.com/services/...';
const slack_req_opts = url.parse(slack_url);
slack_req_opts.method = 'POST';
slack_req_opts.headers = {'Content-Type': 'application/json'};
@Brunas
Brunas / Slide Show.md
Last active June 9, 2020 07:28
Slide show widget

Description

This is Dashing widget to include slide show on your dashboard or one of its pages.

##Usage

Make sure to install RMagick gem to support image resizing. The widget also needs my slightly improved standard image widget. Put the slide_show.rb file in your /jobs folder and slide_show_settings.json to /assets/config/.

Make sure directory /assets/config and /assets/images/slide_show are accessible by Dashing user.

@tracstarr
tracstarr / DashingUnifiVideo.md
Last active August 7, 2018 19:39
Dashing UnifiVideo Widget

Dashing.io Widget for UnifiVideo NVR

This method uses API Key access so I suggest you setup a guest account with API access but limited (Visible and View Feed) access. Then login as the guest user, enable API access, and generate a new key. Copy the key for use.

Switch to the Devices tab and open the Configure dialog for the cam. On the Details tab, right-click the thumbnail view and Copy the image URL to the clipboard. It will look similar to the following if pasted to an address bar or text editor: http://192.168.1.105:7443//api/2.0/snapshot/camera/05a2bc63-d1ce-399f-8327-3a19b0cd3e8f?width=%d&force=true

The guid after /camera/ is what you want to use in the unifivideo.rb file.

You can setup as many cameras as you want, just keep adding settings.

#!/usr/bin/env python
import re
import sys
import json
import requests
USER = 'replace_with_your_username'
PASS = 'replace_with_your_password'
LINE = '7075551212' # your line's phone number
@vjm
vjm / install.sh
Created March 7, 2015 21:38
Raspberry Pi ELK Stack
sudo apt-get install -y supervisor
sudo mkdir /usr/share/elasticsearch
cd /usr/share/elasticsearch
sudo wget https://download.elasticsearch.org/kibana/kibana/kibana-4.0.1-linux-x64.tar.gz
sudo wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.4.tar.gz
sudo wget https://download.elasticsearch.org/logstash/logstash/logstash-1.4.2.tar.gz
sudo tar -zxvf elasticsearch-0.90.0.tar.gz
@ChrisCrewdson
ChrisCrewdson / README.md
Last active October 3, 2020 20:05
Uptime Robot Dashing Widget

Simple Uptime Robot Dashing widget

Description

Dashing widget to display a short list of Uptime Robot monitors.

##Usage

Add this to your Gemfile and run bundle install: