Skip to content

Instantly share code, notes, and snippets.

View SteveMarshall's full-sized avatar

Steve Marshall SteveMarshall

View GitHub Profile
@SteveMarshall
SteveMarshall / AppDelegate.swift
Created October 19, 2020 10:14
CoreSpotlight thumbnails not shown on devices running iOS 14.0 (Regression from iOS 13.6) testcase
import UIKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
return true
}
// MARK: UISceneSession Lifecycle
@SteveMarshall
SteveMarshall / send-magic-packet.sh
Created April 7, 2017 12:28
Wake-On-Lan Magic Packet using netcat in bash
#!/usr/bin/env bash
mac_address=$1
# Strip colons from the MAC address
mac_address=$(echo $mac_address | sed 's/://g')
broadcast=$2
port=4343
# Magic packets consist of 12*`f` followed by 16 repetitions of the MAC address
@SteveMarshall
SteveMarshall / test-sendgrid-bounce
Created October 20, 2015 09:02
Sendgrid bounce checker
#!/usr/bin/env bash
EMAIL=$1
echo $EMAIL
rejections=( spamreports bounces )
for rejection in "${rejections[@]}"
do
printf "${rejection}:\n"
curl "https://sendgrid.com/api/${rejection}.get.json?api_user=${SENDGRID_SMTP_USERNAME}&api_key=${SENDGRID_SMTP_PASSWORD}&email=${EMAIL}"
@SteveMarshall
SteveMarshall / Gemfile
Last active October 14, 2015 21:53
Quick and dirty tool to get code stats from a github org using the API
source 'https://rubygems.org'
gem 'github_api'
gem 'awesome_print'
gem 'pry'
### Keybase proof
I hereby claim:
* I am SteveMarshall on github.
* I am stevemarshall (https://keybase.io/stevemarshall) on keybase.
* I have a public key whose fingerprint is 4DE7 9E3E DAE3 5BF4 C7E1 88B6 688B BDD0 A19A 21B3
To claim this, I am signing this object:
@SteveMarshall
SteveMarshall / gist:1f2d733f2cb8dda330bc
Last active August 29, 2015 14:17
Scale Summit 2015 What's Changed Since Last Year: things and non-things
Notes of Scale Summit 2015 what's changed since last year.
Things last year:
- “Big Data is a thing”; Big Data is now pointless
- “Is CouchDB dead?” npm were? Fairly sure couchdb is now dead, despite more funding
- Under still going: Mongo, Riak. Mongo's not dead? Guardian, GDS, MOJ. Mongo on the rise again? Mongo *might* be dead; we don't know.
- Websockets were "standard" but weren't really… except for certain browsers, proxies, etc.
- HTML5 video still doesn't really work
- Flash is still dying… Unless you count CVEs. Lots of flash-based ads.
- WebGL has taken hold? Still true, apparently.
@SteveMarshall
SteveMarshall / init.pp
Last active August 29, 2015 14:00
Puppetised builddep for nginx
# `apt` is puppetlabs/apt v1.4.2
include '::apt'
apt::source { 'nginx':
location => "http://nginx.org/packages/ubuntu",
repos => 'nginx',
key => '7BD9BF62',
key_source => 'http://nginx.org/keys/nginx_signing.key',
}
@SteveMarshall
SteveMarshall / gist:1589635
Created January 10, 2012 15:34
HTML5 Extended-regex for email
^
[a-zA-Z0-9.!#$%&'*+-/=?\^_`{|}~-]+ # one or more of these pre-@
@
[a-zA-Z0-9-]+ # first (mandatory) domain-part
(?:\.[a-zA-Z0-9-]+)* # subsequent (optional) domain parts inc. TLD
$
@SteveMarshall
SteveMarshall / DVDAuthor homebrew install error
Created August 9, 2011 18:00
Output when trying to `brew install -v dvdauthor` on Mac OS X Lion
(Steven@Steves-iMac usr/local)$ brew install -v dvdauthor 2>&1
==> Downloading http://downloads.sourceforge.net/project/dvdauthor/dvdauthor/0.7.0/dvdauthor-0.7.0.tar.gz
File already downloaded in /Users/Steven/Library/Caches/Homebrew
/usr/bin/tar xf /Users/Steven/Library/Caches/Homebrew/dvdauthor-0.7.0.tar.gz
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/dvdauthor/0.7.0 --mandir=/usr/local/Cellar/dvdauthor/0.7.0/share/man
./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/dvdauthor/0.7.0 --mandir=/usr/local/Cellar/dvdauthor/0.7.0/share/man
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... autotools/install-sh -c -d
checking for gawk... no