Skip to content

Instantly share code, notes, and snippets.

mike stewart mdrmike

Block or report user

Report or block mdrmike

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
@mdrmike
mdrmike / git-commit-messages.markdown
Last active Aug 11, 2017
Git commit "best practices" with or without useful github emoji 💥
View git-commit-messages.markdown

commit-emoji

List of emoji for git commits. 💥

Interesting idea from the Atom.io contributing docs.

Consider starting the commit message with an applicable emoji

@mdrmike
mdrmike / magnoster.zsh-theme
Last active Jun 23, 2017
Theme: zsh shell magnoster theme for oh-my-zsh. Save file in `~/.oh-my-zsh/plugins/custom/` then enable by editing `~/.zshrc` `ZSH_THEME="magnoster"`
View magnoster.zsh-theme
# vim:ft=zsh ts=2 sw=2 sts=2
#
# magnoster theme - https://gist.github.com/mdrmike/42c400f985d02673344f810ef2e32918
# Custom fork of:
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
View setup-patternlab.sh
#!/bin/bash
# DO NOT RUN AS ROOT
# Customize to your liking, or run as-is
PL_PRJNAME="my-patternlab/"
C9_WORKSPACE="workspace/"
function install_composer {
View Install-bootstrap-on-Jekyll--3-2-x.sh
#!/bin/sh
bootstrap_folder="_bootstrap-install"
backup_folder="$bootstrap_folder/backup"
# Check for existing folders and create backupfolder
( [[ -d css ]] || [[ -d fonts ]] || [[ -d images ]] || [[ -d js ]] ) && ( [[ ! -d "$backup_folder" ]] && mkdir -p "$backup_folder" )
# Backup existing folders
[[ -d css ]] && mv css "$backup_folder/"
View setup-jekyll.sh
#!/bin/sh
gem install jekyll bundler && echo ">>> Installed Jekyll and Bundler"
echo -e "source 'https://rubygems.org'\n\ngem 'github-pages', group: :jekyll_plugins" > Gemfile
bundle install && echo ">>> Installed Github pages dependencies"
bundle exec jekyll new . --force && echo ">>> Installed Jekyll"
sed -i 's|gem "jekyll"|# gem "jekyll"|g' Gemfile && echo ">>> Configured Gemfile: remove jekyll version lock"
sed -i 's|# gem "github-pages"|gem "github-pages"|g' Gemfile && echo ">>> Configured Gemfile: require github-pages gem"
sed -i 's|^ gem "jekyll-feed|# gem "jekyll-feed|g' Gemfile && echo ">>> Configured Gemfile: remove jekyll-feed gem"
echo -e "Gemfile.lock\n.c9\n_config_dev.yml\n" >> .gitignore
View dev-perms-wp.sh
#!/bin/bash -ex
# SETUP PERMISSIONS
VPATH=${1%/}
GROUP_WEBWORK=${2}
WEBSERVER="www-data"
HELP="\nHelp: This script is used to fix permissions\nPlease provide the following arguments:\n\t 1) Path to web root\n\t 2) Shared workgroup of website. AKA group ownership\nNote: \"www-data\" (apache default) is assumed as the owner of the web files.\n\nUsage: [sudo] bash ${0##*/} [web_root_path] [group_name]\n"
[ -z "$VPATH" ] && VPATH=`pwd` # is null, use present dir
[ -z "$GROUP_WEBWORK" ] && GROUP_WEBWORK=webwork # is null, set default
@mdrmike
mdrmike / jekyll-and-liquid.md
Created Apr 14, 2016
Jekyll & Liquid Cheatsheet
View jekyll-and-liquid.md

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes:

@mdrmike
mdrmike / ufw-setup.md
Created Mar 27, 2016
Quick Firewall Setup for VBox Development using ufw
View ufw-setup.md
View keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

You can’t perform that action at this time.