Skip to content

Instantly share code, notes, and snippets.

View nelsonJM's full-sized avatar

Josh Nelson nelsonJM

View GitHub Profile
@nelsonJM
nelsonJM / machine.js
Last active April 22, 2020 12:10
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@nelsonJM
nelsonJM / machine.js
Created January 4, 2020 06:47
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@nelsonJM
nelsonJM / .bashrc
Created April 10, 2014 17:01
Ubuntu: my .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
@nelsonJM
nelsonJM / .bash_aliases
Created April 10, 2014 17:00
Ubuntu: my .bash_aliases
# My aliases
# to start compass
alias mycompass='source /home/josh/.rvm/scripts/rvm'
# to mount shared drive
alias devshare='sudo mount -t vboxsf devshare ~/devshare'
alias locals='sudo mount -t vboxsf Local-SS ~/Local-SS'
# to start, stop, and restart xampp
alias xamppstart='sudo /opt/lampp/lampp start'
@nelsonJM
nelsonJM / .bash_profile
Created April 10, 2014 16:59
Ubuntu: my .bash_profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
source ~/.profile
@nelsonJM
nelsonJM / .profile
Created April 10, 2014 16:56
Ubuntu: my .profile
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
@nelsonJM
nelsonJM / gist:10261306
Created April 9, 2014 12:04
jQuery: Disable checkboxes
(function($) {
$('#framesize-section').html('<input id="enable-checkboxes" type="checkbox"><label>Enable</label>');
var noNews = '<input type="checkbox" id="no-news"><label>No thanks</label>';
var yesNews = '<input type="checkbox" id="yes-news"><label>Yes, please</label>';
$('#message').append(noNews);
$('#message').append(yesNews);
var enable = $('#enable-checkboxes');
var disabledInputs = $('#accessories-section').find('input[type=checkbox]');
@nelsonJM
nelsonJM / gist:9627125
Created March 18, 2014 19:06
Template for Documenting a WordPress function
/**
* Short Description
*
* Long Description
*
* @package WordPress
* @since version
*
* @param type $varname Description
* @return type Description
@nelsonJM
nelsonJM / gist:7832699
Created December 6, 2013 21:49
Grunt: Package.json example
{
"name": "steelsentry-theme",
"author": "josh",
"version": "0.1.0",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-uglify": "~0.2.2",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-cssmin": "~0.6.1",
"grunt-contrib-imagemin": "~0.3.0",
@nelsonJM
nelsonJM / gist:7832678
Created December 6, 2013 21:47
Grunt: Gruntfile.js example
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
imagemin: {
static: {
options: {
optimizationLevel: 3
},
files: {
'pbimages/pegboard-2424.jpg': 'img_src/pbimages/pegboard-2424.jpg'