Skip to content

Instantly share code, notes, and snippets.

Avatar

Steve Marshall SteveMarshall

View GitHub Profile
@SteveMarshall
SteveMarshall / AppDelegate.swift
Created Oct 19, 2020
CoreSpotlight thumbnails not shown on devices running iOS 14.0 (Regression from iOS 13.6) testcase
View AppDelegate.swift
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 Apr 7, 2017
Wake-On-Lan Magic Packet using netcat in bash
View send-magic-packet.sh
#!/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
View test-sendgrid-bounce
#!/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 Oct 14, 2015
Quick and dirty tool to get code stats from a github org using the API
View Gemfile
source 'https://rubygems.org'
gem 'github_api'
gem 'awesome_print'
gem 'pry'
View gist:4863ff2d04352808efe9
### 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 Aug 29, 2015
Scale Summit 2015 What's Changed Since Last Year: things and non-things
View gist:1f2d733f2cb8dda330bc
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 Aug 29, 2015
Puppetised builddep for nginx
View init.pp
# `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 Jan 10, 2012
HTML5 Extended-regex for email
View gist:1589635
^
[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 Aug 9, 2011
Output when trying to `brew install -v dvdauthor` on Mac OS X Lion
View DVDAuthor homebrew install error
(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