Skip to content

Instantly share code, notes, and snippets.

Mark Steadman iamsteadman

Block or report user

Report or block iamsteadman

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
View gitlab-ci.yml
- test
- build
- migrate
- deploy
iamsteadman /
Created Jul 21, 2018
Mind Hacking workbook

Day 1: Accepting the Quest

Write "Hello World!" Then decide on a specific time and place you will practice mind hacking each day, and keep the practice sheet in that spot as a visual reminder.

Day 2: What Was My Mind Just Thinking?

Start building up awareness of your mind by asking yourself, as frequently as possible, "What was my mind just thinking?" Keep track of how many times you remember to "check in" on your mind today.

Day 3: Squirrel!

For the rest of the day, try to become aware of whenever your attention is pulled away from the task at hand by either digital or human interruptions. Try to become aware of the feeling of "broken flow" when you lose your concentration. Keep track of how many interruptions you notice, and write down your total score.

Day 4: The One-Hour Investment

iamsteadman /
Created Mar 9, 2018
Adding server-side validation support to ember-bootstrap-cp-validations

I spent a day trying to figure out how to get ember-bootstrap to handle server-side (HTTP 422) validation errors. I tried the three supported validation packages (two of which don't work with the newest version of Ember.js), and finally began to understand that ember-cp-validations has nothing to do with server-side errors.

So, taking inspiration from ember-bootstrap-ds-error-validations, which causes errors when combined with another validation package, I was able to put something fairly simple in place.

I'll be honest, I don't entirely know what the app/components/bs-form.js file is doing (this was taken from ember-bootstrap-cp-validations I think), but that, combined with app/components/bs-form/element.js, which takes the server-side messages and places them in the customError property (as a computed property), I get a combination of client- and server-side validation that works. At least for me.

View gist:c35bd4a424aa421af92bead2d39a7b35
Verifying that "" is my Blockstack ID.
iamsteadman / bookmarklet.js
Created Feb 3, 2016
Acast embed bookmarklet
View bookmarklet.js
function() {
var found = false;
document.querySelectorAll('.player-embedded-v2 iframe'),
function(iframe, index) {
var src = iframe.getAttribute('src');
var width = 640;
var height = 80;
iamsteadman / sidebar.js
Created Aug 14, 2015
Smooth floating sidebar
View sidebar.js
jQuery(document).ready( function() { / ... All my other theme setup calls ... /
var topbar = jQuery('#wpadminbar').size() > 0 ? jQuery('#wpadminbar').height() : 0;
var sidebar = jQuery('#sidebars');
var startOffset = sidebar.parent().offset().top;
var offsetY = parseInt(sidebar.parent().css('padding-top'));
var offsetX = sidebar.position().left + sidebar.parent().position().left;
function() {
iamsteadman / ffmpeg.yaml
Created Jun 30, 2015
An Ansible playbook include for installing ffmpeg on Ubuntu
View ffmpeg.yaml
- name: Install yasm
shell: 'chdir=/tmp {{ item }} creates=/usr/local/bin/yasm'
- wget
- tar xzvf yasm-1.2.0.tar.gz
- cd yasm-1.2.0; ./configure && make && make install && make distclean
- name: Install x264
iamsteadman / breakout.js
Last active Aug 29, 2015
Make images break out of their containers, responsively
View breakout.js
// I'm using a Ghost theme and I wanted a way for certain images to break out of their container, but
// still work responsively. I wrote a JavaScript kludge to do just that. It makes specific images
// full-width, then calculates the height the image needs, if it's to retain the same aspect ratio.
// We absolutely-position the image to the left, which means all the content that follows will be
// out of whack, so we create a div that adds empty (invisible) space between the top of the image
// and the next element. We run this every time the browser resizes, and voila... sort of.
// I added this JavaScript to the end of my blog theme's <script> tags and it works. That's about
// all I can say!
iamsteadman / bbpress-to-phpbb.sql
Last active Apr 22, 2018
Convert newer-style bbPress forums (where content is stored as WordPress posts) to phpBB. Based on code by primehifi (
View bbpress-to-phpbb.sql
/* If anything goes wrong, let's not muck up the database */
/* Clear tables and reset IDs */
TRUNCATE TABLE phpbb_forums;
TRUNCATE TABLE phpbb_topics;
TRUNCATE TABLE phpbb_topics_posted;
TRUNCATE TABLE phpbb_topics_track;
TRUNCATE TABLE phpbb_posts;
DELETE FROM phpbb_acl_groups WHERE forum_id > 0;
iamsteadman /
Created Mar 4, 2014
Add your Twitter friends' RSS feeds to a single OPML file
This script requires the following Packages
1: Twitter:
2: PyQuery:
3: Jinja2:
It's fairly primitive but works. It uses a Jinja2 template to create an OPML
file from the RSS feeds of the websites run by the people you follow on
You can’t perform that action at this time.