Skip to content

Instantly share code, notes, and snippets.

View ssplatt's full-sized avatar

Brett Taylor ssplatt

  • Picwell
  • Philadelphia, PA
View GitHub Profile
@ssplatt
ssplatt / pyTorrentFeedDownloader.py
Created October 5, 2015 02:21
add torrent to transmission from rss feed and sort into subdirectory based on file name
#!/usr/bin/env python
import feedparser, subprocess, urllib2, re, os, libtorrent
out_dir_base = ''
logfile = ''
rss=''
feed = feedparser.parse(rss)
log = open( logfile, 'r+' )
log_cont = log.read()
@ssplatt
ssplatt / jira_service.j2
Created October 12, 2015 18:43
JIRA systemd service file jinja template
[Unit]
{% from "jira/map.jinja" import jira with context %}
Description=JIRA Issue Tracker
After=syslog.target
After=network.target
[Service]
ExecStart={{ jira.install_dir }}/bin/start-jira.sh
ExecStop={{ jira.install_dir }}/bin/stop-jira.sh
RemainAfterExit=yes
<table style="border-collapse: collapse; margin: 0px auto; padding: 0px;">
<thead style="background: silver; font-size: 1.5em; font-weight: bold; padding: 5px; border-bottom: 2px solid grey;">This is the heading</thead>
<tbody>
<tr>
<td style="border: 0px; padding: 5px; border: 1px solid grey;">things</td>
<td style="border: 0px; padding: 5px; border: 1px solid grey;">more things</td>
</tr>
</tbody>
</table>
salt:
mirrors:
- ftp.us.debian.org
- ftp.uk.debian.org
- ftp.ua.debian.org
locations:
- us
- uk
- ua
@ssplatt
ssplatt / zulip_push_email.py
Last active December 7, 2015 15:10
push local mailbox mail to zulip
#!/usr/bin/env python
import zulip
import mailbox
client = zulip.Client(email="[email protected]",
api_key="111222aaabbb",
site="https://zulip.server.tld/api/")
mailbox_loc = '/var/mail/user'
@ssplatt
ssplatt / gist:fbf2899d00d4f881239a
Created January 14, 2016 19:05
textmate grok bundle
{ patterns = (
{ name = 'comment.line.number-sign.grok';
match = '^#[^\n]+\n';
},
{ name = 'variable.parameter.grok';
begin = '^[A-Z0-9_\-]+';
end = '\s';
},
{ name = 'variable.other.grok';
begin = '%{';
@ssplatt
ssplatt / bootstrap-salt-deb6.sh
Last active March 4, 2016 01:52
modified salt bootstrap script to work with EOL debian 6
#!/bin/sh -
#======================================================================================================================
# vim: softtabstop=4 shiftwidth=4 expandtab fenc=utf-8 spell spelllang=en cc=120
#======================================================================================================================
#
# FILE: bootstrap-salt.sh
#
# DESCRIPTION: Bootstrap Salt installation for various systems/distributions
#
# BUGS: https://github.com/saltstack/salt-bootstrap/issues
@ssplatt
ssplatt / install.sh
Last active November 20, 2017 00:13
kitchen salt bootstrap chef omnibus modification
#!/bin/sh
packages="ruby ruby-dev"
# install_file TYPE FILENAME
# TYPE is "rpm", "deb", "solaris", "sh", etc.
install_file() {
echo "Installing the ruby things"
case "$1" in
"redhat")
----------
ID: networking_system_config
Function: network.system
Result: True
Comment: Global network settings are up to date.
Started: 21:06:15.944862
Duration: 28.254 ms
Changes:
----------
network_settings:
check_for_minion_to_autoaccept:
local.file.line:
- name: /etc/salt/autoaccept.conf
- content: {{ data.id }}
- mode: delete
- require_in:
- wheel: minion_auto_add
minion_auto_add:
wheel.key.accept: