Skip to content

Instantly share code, notes, and snippets.

@rdebeasi
rdebeasi / event-storming.md
Last active May 17, 2018 13:30
Notes for running an event storming workshop

From a whiteboard that someone wrote in Boston:

  1. Establish goal & context
  2. Users/functional roles
  3. Important steps on timeline? (step)
  4. What does the button say? (command)
  5. What does the button do? (event)
  6. What data do you need to successfully press the button? (aggregate)
  7. Is there a UI for this? (view)
@rdebeasi
rdebeasi / posts-to-taxonomies.sh
Created October 27, 2017 21:12
Convert Hugo posts to taxonomies
#!/bin/bash
# Run this in the directory containing the content type that you'd like to move.
# This script moves each markdown file into a new directory of the same name and renames the file to _index.md.
# You'll also need to add the taxonomy to config.toml.
FILES=*.md
for file in $FILES
do
filename="${file%%.*}"
if [ "$filename" == "_index" ]; then
@rdebeasi
rdebeasi / fastly-debug.sh
Created November 4, 2015 21:25
Use curl to debug fastly
curl -svo /dev/null -H "Fastly-Debug: true" http://www.statnews.com/feed/
@rdebeasi
rdebeasi / download-page.sh
Created October 16, 2015 21:11
Download web page, rewriting URLs to be sane and downloading assets
wget [url] -p -k -E --restrict-file-names=windows
@rdebeasi
rdebeasi / sshtail.sh
Last active October 1, 2015 21:47
Bash Script to feed a remote log via ssh to a local file.
#!/bin/bash
#
# Usage:
#
# server logfile/path output/path
# example sshtail.sh user@ssh.server /var/log/apache2/error.log ~/tmp/error.local.log
[ "$1" == "--help" ] && { printf "Usage: server logfile/path output/path\n"; exit; }
# Delete the file so we don't output anything until after we connect
@rdebeasi
rdebeasi / shelve
Last active May 16, 2016 08:01
Simple equivalent of "git stash" for Subversion
#!/bin/sh
# Simple equivalent of "git stash" in Subversion.
# This doesn't require creating branches (which can get messy) or using patches
# (which doesn't work if a visual diff tool is configured).
# More ideas: http://stackoverflow.com/q/1554278/925475
# If any comamand fails, abort the script.
set -e
# This file follows the WordPress CSS standards as closely as possible. For any
# linters that aren't listed in this file, we're accepting the default settings.
# https://make.wordpress.org/core/handbook/best-practices/coding-standards/css/
# Linter documentation: http://git.io/vG7gu
# See also: http://sass-guidelin.es/
linters:
Comment:
@rdebeasi
rdebeasi / autorun.bat
Last active August 29, 2015 14:24
Like bash's .profile, but on Windows
@echo off
:: This file is like bash's .profile, but for the Windows command prompt.
:: To run this file when a command prompt starts, a registry entry at
:: "HKEY_CURRENT_USER\Software\Microsoft\Command Processor".
:: The name of the entry will be "AutoRun", and the value will be the path to this file.
:: http://darkforge.blogspot.co.uk/2010/08/permanent-windows-command-line-aliases.html
doskey subl="C:\Program Files\Sublime Text 3\sublime_text.exe" $*
doskey opendiff="C:\Program Files (x86)\Meld\meld\meld.exe" $*
@rdebeasi
rdebeasi / chromer-sparta.md
Last active August 29, 2015 14:14
In which @chromershow meets spartan

CHROMER: I cn no woerk. am goeing too baar

u caent stopme

druunk chromering is teh oonley chromering

am build all canaarie

am gonn paly darts wit fiarfox

@rdebeasi
rdebeasi / mvc-in-authors-own-words.md
Last active August 29, 2015 14:05
JavaScript MVC Frameworks in the authors' own words

#Ember "Ember.js, therefore, is a synthesis of the powerful tools of our native forebears with the lightweight sensibilities of the modern web." "...we're not willing to give you a little bit of rope if we think you'll just end up hanging yourself with it as your app grows. " - Tom Dale

#Backbone "Backbone.js is intended to be fairly agnostic about many common patterns in client-side code." "'Two way data-binding' is avoided. While it certainly makes for a nifty demo, and works for the most basic CRUD, it doesn't tend to be terribly useful in your real-world app." - Jeremy Ashkenas

#Angular "Other frameworks deal with HTML’s shortcomings by either abstracting away HTML, CSS, and/or JavaScript or by providing an imperative way for manipulating the DOM. Neither of these address the root problem that HTML was not designed for dynamic views." "Unlike other frameworks, there is no need to inherit from proprieta