Skip to content

Instantly share code, notes, and snippets.


Stuart Wilson iamstuartwilson

Block or report user

Report or block iamstuartwilson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
iamstuartwilson / imports-to-links.js
Created Feb 20, 2017
Extract @imports in <style> elements to individual <link> elements
View imports-to-links.js
iamstuartwilson / slack-file-killer.js
Last active Aug 8, 2018
Kill multiple slack files from your browser console. Simply paste this code when on the "https://[space][me]" page.
View slack-file-killer.js
$('#files_list > [data-file-id]').each(function(i) {
function killIt(id) {
$.post('/api/files.delete', {
file: id,
token: boot_data.api_token
iamstuartwilson /
Created May 14, 2015
Working with Strava API

Things to think about

  • Building our own client. strava-v3 is quite good, but I'm not a fan of the interface
  • Making value objects for units of distance and time. How do we hold data centrally to allow users freedom to switch between metric and imperial
  • Isomorphic JS, what can we ship on the front and back?
  • Data crunching. How are we setting up mutliple API requests and queueing them without borking our server or maxing out rate limits?
iamstuartwilson / mailto.js
Last active Aug 29, 2015
jQuery mailto param scraper
View mailto.js
$('a[href^="mailto:"]').click(function(e) {
var uri = $(this).attr('href');
var emailRegEx = new RegExp(/\mailto:(.*?)\?/);
var params = uri.replace(emailRegEx, '').split('&');
var email = uri.match(emailRegEx);
var fields = {
email: email ? email[1] : null,
subject: null,
body: null
You can’t perform that action at this time.