Skip to content

Instantly share code, notes, and snippets.

View mdrmike's full-sized avatar

mike stewart mdrmike

  • Media Done Right
  • Long Beach, CA
View GitHub Profile
@mdrmike
mdrmike / Ubuntu-1404--Desktop--addons.sh
Last active December 1, 2015 16:46
Ubuntu 14.04 useful PPA & utility installs
#!/bin/bash
# Copyright (C) 2015 Mike Stewart.
# Permission is granted to copy, distribute and/or modify this document
# under the terms of the GNU Free Documentation License, Version 1.3
# or any later version published by the Free Software Foundation;
# with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
# A copy of the license is included in the section entitled "GNU
# Free Documentation License".
# This script was written for cut & paste into a terminal shell, but it
@mdrmike
mdrmike / Gemfile
Last active March 17, 2016 05:20
Jekyll Gemfile for github pages and Travis-CI
# Gemfile to setup Jekyll for use with Github pages hosting
# Based on
# - https://jekyllrb.com/docs/github-pages/
# - https://jekyllrb.com/docs/continuous-integration/
source 'https://rubygems.org'
require 'json'
require 'open-uri'
versions = JSON.parse(open('https://pages.github.com/versions.json').read)

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@mdrmike
mdrmike / ufw-desktop-setup.md
Last active May 19, 2020 20:43
Quick Firewall Setup for VBox Development using ufw
@mdrmike
mdrmike / jekyll-and-liquid.md
Created April 14, 2016 05:10
Jekyll & Liquid Cheatsheet

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:

#!/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
#!/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
#!/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/"
#!/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 {