Skip to content

Instantly share code, notes, and snippets.

View martastain's full-sized avatar

Martin Wacker martastain

View GitHub Profile
@martastain
martastain / client.py
Created March 29, 2014 09:17
Poor man's HTTP Push notifications
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from urllib.parse import urlencode
from urllib.request import urlopen
url = "http://localhost:10000/"
try:
with urlopen(url, timeout=3) as feed:
@martastain
martastain / crontab
Created April 21, 2016 15:04
streampunk tools
# delete segments older than 10 mins
*/5 * * * * find /mnt/cache/streampunk/ -maxdepth 1 -mmin +10 -type f -name "*.ts" -exec rm -f {} \;
@martastain
martastain / backup.sh
Last active December 23, 2022 19:54
Server backup script
#!/bin/bash
HOST="server.whatever.org"
USER="root"
BACKUP_LOCATIONS=(
"/etc/postfix"
"/etc/fail2ban"
"/etc/nginx"
"/etc/php5"
@martastain
martastain / draft.md
Last active July 27, 2016 14:04
MAM API Draft

MAM API draft

This draft only handles asset creation, editing and viewing. It does not deal with:

  • API versioning
  • authentication
  • job control
  • rundown edit
@martastain
martastain / gist:554c663ce63af6c5068f3e6434c0692b
Created September 16, 2016 16:30
win requirements for cgtool
CherryPy (8.1.0)
Jinja2 (2.8)
MarkupSafe (0.23)
nxtools (0.5.6)
Pillow (3.3.1)
pip (8.1.1)
pygobject (3.18.2)
pygtk (2.22.0)
PyYAML (3.12)
setuptools (20.10.1)
@martastain
martastain / firefly_windows.md
Last active October 13, 2016 13:13
Nebula install

Install python

Latest tested version is 3.5.2 x64 you can get it here: https://www.python.org/ftp/python/3.5.2/python-3.5.2-amd64.exe

During the setup, install python for all users including pip and add Python path to windows env. variables. After the installation, it should be located in c:\Program Files\Python35.

@martastain
martastain / crontab
Last active February 28, 2017 08:07
nginx dash/hls cache
@reboot mkdir -p /mnt/cache/origin_dash && chown www-data:www-data /mnt/cache/origin_dash
@reboot mkdir -p /mnt/cache/origin_hls && chown www-data:www-data /mnt/cache/origin_hls
*/5 * * * * find /mnt/cache/origin_dash -not -name "*init*" -not -name "*raw*" -mmin +5 -type f -exec rm -f {} \;
*/5 * * * * find /mnt/cache/origin_hls -maxdepth 1 -mmin +5 -type f -exec rm -f {} \;
@martastain
martastain / joiner.py
Created August 29, 2017 21:17
manifest_joiner
#!/usr/bin/env python
import os
import time
import rex
import datetime
from nxtools import *
from mpd import *
from isodate import *
@martastain
martastain / CHANGELOG.md
Last active February 11, 2019 23:47
Nebula Changelog

5.1.1

This release brings some UX enhancements based on users feedback. Doing mistakes is no longer so easy.

  • Hub : Reload system settings button in the services view (admin only)
  • Firefly: Fixed radio button select in new asset tab
  • Firefly: Combo box and spin edit change is no longer changeable using mouse wheel if not explicitly focused
  • Firefly: Toggleable rundown edit mode
@martastain
martastain / balloontip.py
Created March 8, 2019 21:57 — forked from wontoncc/balloontip.py
Balloon tip module, Python, using win32gui.
# -- coding: utf-8 --
from win32api import *
from win32gui import *
import win32con
import sys, os
import struct
import time
class WindowsBalloonTip: