Skip to content

Instantly share code, notes, and snippets.

View mattstabeler's full-sized avatar

Matt Stabeler mattstabeler

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<a class="twitter-timeline" data-dnt="true" href="https://twitter.com/search?q=%23freeplay6%20%40Betfair" data-widget-id="707962088631758848">Tweets about #freeplay6 @Betfair</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
@mattstabeler
mattstabeler / keysExist.py
Last active November 14, 2016 08:50
Python check object keys exists
# Search an object heirarchy for the presence of the given keys
def keyExists(obj, keys):
first, rest = keys[0], keys[1:]
if first in obj or len(obj) > int(first):
if len(rest) == 0:
return True
return keyExists(obj[first], rest)
return False
@mattstabeler
mattstabeler / iframe-resizer.ts
Last active August 21, 2018 17:46
iFrame resizer (consumer) for angular 2
// add this directive to an iFrame element and pass a name of the source, and this will change the height based on the
// events passed from the iframe source. the name of the source, and type of the message are checked before making a
// change to the element width.
// expects an object like to have been sent through the window.postMessage() interface :
// {
// type: 'resize',
// source: 'some-iframe-content',
// value: {
// height: 200
@mattstabeler
mattstabeler / giffy.sh
Created December 15, 2016 17:05
convert a movie file to a gif
#!/bin/bash
# assumes you have ffmpeg - brew install ffmpeg
if [ -z "$1" ]; then
echo "No input file"
exit
fi
if [ -z "$2" ]; then
echo "No output file"
exit
fi
@mattstabeler
mattstabeler / delete_slack_files.py
Last active August 30, 2018 03:39
Python script to delete your old files from slack
#!/usr/local/bin/python
import urllib, json, time
# find files older than X and delete them
# https://api.slack.com/docs/oauth-test-tokens
token = "your-token-here"
# https://api.slack.com/methods/users.identity looks like "U2XXXXXXX"
user = "your-user-id"
@mattstabeler
mattstabeler / gist:c4cf0bc2a8d56b88d3f68a6bbc8c8100
Created May 14, 2018 14:34
In each subdir - set the git email address
find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "cd '{}' && git config user.email you@example.co.uk" \;
#!/bin/zsh
# Alias this to your ~/bin/ directory: `ln -s ~/git/dcp/dcp.sh ~/bin/dcp
# and `chmod +x ~/git/dcp/dcp.sh`
# docker-compose "$@"
docker compose "$@"
@mattstabeler
mattstabeler / Docker Composer Apache PHP wordpress setup.md
Last active July 28, 2020 11:14
Apache PHP Docker Compose for Wordpress

docker-compose build www

docker-composer up -d wpdb redis www

@mattstabeler
mattstabeler / Epsonp600Marrutt_cheat-sheet.md
Last active December 2, 2020 16:02
A gist to help get the correct settings for each paper type on the Epson P600 printer

Marrutt Papers and ProHD Inks

For the Epson P600 printing from a Mac in either Adobe Colour Printer Utility, or Adobe Lightroom Classic.

Marrutt 280gsm Traditional Baryta Hi-White Semi Gloss Paper

On the printer: Premium Luster
In print settings: Ultra Premium Photo Luster