Skip to content

Instantly share code, notes, and snippets.

Mike Murray mikemurray

Block or report user

Report or block mikemurray

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
View gist:84e45f61c1ab9659d35a85eb35387584
### Keybase proof
I hereby claim:
* I am mikemurray on github.
* I am mikemurray (https://keybase.io/mikemurray) on keybase.
* I have a public key ASBJ0Ic1z9Yya6W7jvqC2s2ewSqeK110-bQFybjambpQgwo
To claim this, I am signing this object:
@mikemurray
mikemurray / script.sh
Last active Mar 25, 2016
Reaction Docs re-org structure
View script.sh
mkdir -p "1 Introduction"
git mv index.md "1 Introduction/index.md"
git mv admin/dashboard.md "1 Introduction/dashboard.md"
git mv admin/tags.md "1 Introduction/tags.md"
git mv admin/products.md "1 Introduction/products.md"
git mv admin/orders.md "1 Introduction/orders.md"
git mv admin/shipping.md "1 Introduction/shipping.md"
git mv admin/faq.md "1 Introduction/faqs.md"
mkdir -p "2 Developer"
git mv developer/getting-started.md "2 Developer/index.md"
@mikemurray
mikemurray / babel.js
Created Mar 5, 2016
Configure meteor babel (meteor 1.3 beta 11)
View babel.js
// ... (add to top of file)
const stage0Preset = Npm.require("babel-preset-stage-0")
// ... (code omitted for brevity)
function getDefaultOptions(extraFeatures) {
// ... (code in function omitted for brevity)
// ... Right before the return, push your preset into the presets array of options
options.presets.push(stage0Preset)
View hooks-example.js
ReactionCore.MethodHooks.before("workflow/pushOrderWorkflow", function (options) {
check(options, Match.OrderHookOptions);
console.log("workflow/pushOrderWorkflow: About to check status", options);
let workflow = options.arguments[0];
let status = options.arguments[1];
let order = options.arguments[2];
if (Meteor.server.method_handlers[workflow]) {
let result = Meteor.call(`workflow/${workflow}/${status}`, options);
@mikemurray
mikemurray / code.md
Last active Dec 18, 2015
Proposed steps to setting and validation a workflow status using collection hooks
View code.md

Somewhere in reaction...

STEP 1: meteor call to push a new workflow

NOTE: coreOrderWorkflow, processing will be combined into coreOrderWorkflow/processing and set as the status.

Meteor.call("workflow/pushOrderWorkflow", "coreOrderWorkflow", "processing", order);

On the server...

STEP 2: workflow/pushOrderWorkflow tries to update the current status

@mikemurray
mikemurray / sublime_settings.json
Created Aug 23, 2013
Sublime Text, personal settings
View sublime_settings.json
{
"color_scheme": "Packages/Theme - Phoenix/Color Scheme/Clouds Midnight.tmTheme",
"font_size": 12.0,
"ignored_packages":
[
"Vintage",
"SFTP"
],
"indent_guide_options":
[
@mikemurray
mikemurray / transmit_force_unmount.sh
Last active Sep 14, 2016
Kill ALL transmit disk sshfs mounts. Use this when you are unable to eject / mount a sshfs volume because of a disconnect. Don't use this to unmount them normally if you have the option. This could be dangerous, so use at your own risk!
View transmit_force_unmount.sh
# List all running transmit disk tasks
# ---------------------------------------------------------------------------
ps aux | grep "Transmit Disk"
# Kill All transmit disk tasks.
#
# Potentially dangerious as it could apply to all users on system.
# ---------------------------------------------------------------------------
pkill -9 -f "Transmit Disk"
@mikemurray
mikemurray / iteration.php
Created Aug 6, 2013
Grid system row assistance for loops.
View iteration.php
<?php
// Loop Variables
$max_per_row = 2;
?>
<?php for($i = 0; $i < count($data); $i++): ?>
<?php if($i % $max_per_row == 0 || $i == 0): ?>
<div class="grid-row"> <!-- Start Grid row -->
<?php endif ?>
@mikemurray
mikemurray / Gruntfile.js
Created Jul 26, 2013
Gruntfile for PHP and LESS with livereloading
View Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
php: {
dev: {
options: {
hostname: '127.0.0.1',
View index.html
<script src="/_js/vendor/froogaloop2.min.js"></script>
You can’t perform that action at this time.