Skip to content

Instantly share code, notes, and snippets.

View mdigital's full-sized avatar

Robin Marshall mdigital

View GitHub Profile
@mdigital
mdigital / ux-components.md
Created March 23, 2023 20:31
Plain Language UX components

ChatGPT 4 session

I want to create a resource that shows consistent plain language descriptions for UX components of digital products. For example, the best plain language description for a modal and a fieldset. Can you give me this for common components such as these?

Of course! Here's a list of plain language descriptions for common UX components of digital products:

  • Modal: A pop-up window that appears on top of the main content, usually asking for user input or providing information. Users must interact with it or close it before returning to the main content.

  • Fieldset: A group of related input fields or options, often with a label indicating the overall purpose of the group. This helps users understand the context for the fields they're interacting with.

@mdigital
mdigital / README-Template.md
Last active February 18, 2019 01:52 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of product description goes here

Getting Started

These instructions will get you a copy of the product up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@mdigital
mdigital / gist:9417030
Created March 7, 2014 18:28
Custom Map Markers for Google Maps
<html>
<head>
<title>Google Maps JavaScript API v3: Custom Marker Demo</title>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script>
function CustomMarker(latlng, map) {
this.latlng_ = latlng;
// Once the LatLng and text are set, add the overlay to the map. This will
function pr () {
target_branch=$1
local repo=`git remote -v | grep -m 1 "(push)" | sed -e "s/.*github.com[:/]\(.*\)\.git.*/\1/"`
local branch=`git name-rev --name-only HEAD`
echo "... creating pull request for branch \"$branch\" in \"$repo\""
if [[ ! -z $target_branch ]]; then
open https://github.com/$repo/pull/new/$target_branch...$branch
else
open https://github.com/$repo/pull/new/$branch
fi
@mdigital
mdigital / jquery.hint.js
Created June 27, 2013 09:53
Placeholder polyfill that support's password fields - based on Remy Sharp's jquery plugin
jQuery.fn.hint = function (blurClass) {
if (!blurClass) {
blurClass = 'blur';
}
return this.each(function () {
// get jQuery version of 'this'
var $input = jQuery(this),
// capture the rest of the variable to allow for reuse
@mdigital
mdigital / gist:2998640
Created June 26, 2012 20:18
Google Analytics Outbound Link Tracking in CoffeeScript
$('a[href^="http"]').on 'click', (e) ->
e.preventDefault
_gaq.push(['_trackEvent', 'Outbound', 'click', this.href])
callback = -> window.location = arguments[0]
setTimeout callback, 200, this.href
@mdigital
mdigital / gist:2907430
Last active October 6, 2015 00:57
.bash_profile including set_title and git prompt
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/ [\1$(parse_git_dirty)]/"
}
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
@mdigital
mdigital / to_haml.rb
Created June 7, 2012 22:41 — forked from johnnyicon/to_haml.rb
Convert all html.erb files to html.haml while preserving git history
# Adapted the script listed in the following link to maintain git history
# Original Script: http://snippets.dzone.com/posts/show/5449
# Usage:
# 1) Copy the file to the root of your Rails app
# 2) Run the script (i.e., ruby to_haml.rb app/views)
class ToHaml
def initialize(path)
@path = path
end
@mdigital
mdigital / JsonPExampleinBackbone.js
Created June 7, 2012 02:21 — forked from denisos/JsonPExampleinBackbone.js
Backbone.js model calling jsonp
// backbone.js continues to impress, I needed to get data from a jsonp api
// I really wanted to do this the "right" backbone.js way and create a model and call fetch.
// But the default backbone synch is not jsonp
// Turns out you can override a synch on a per model basis (thanks stackoverflow)
// whats nice is backbone.js continue to work as expected with the override
// here's a snippet (some changes to protect our privacy). An improvement could be to create a jsonp model class which MyModel inherits
// the synch function is most important below, that's what tells backbone it's jsonp
MyModel = Backbone.Model.extend({
@mdigital
mdigital / .bashrc
Created May 31, 2012 21:33 — forked from henrik/.bashrc
Git branch and dirty state in Bash prompt.
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# username@Machine ~/dev/dir[master]$ # clean working directory
# username@Machine ~/dev/dir[master*]$ # dirty working directory
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"