Skip to content

Instantly share code, notes, and snippets.

View mcrider's full-sized avatar

Matt Crider mcrider

View GitHub Profile
@mcrider
mcrider / keybase.md
Last active December 11, 2017 19:08
Keybase Proof

Keybase proof

I hereby claim:

  • I am mcrider on github.
  • I am mcrider (https://keybase.io/mcrider) on keybase.
  • I have a public key ASAN5-1ClhVC8YxmW1oOMgCNXpAEP9KIoivznnEGnYPccgo

To claim this, I am signing this object:

@mcrider
mcrider / cockpit.patch
Created March 11, 2016 17:37
Cockpit CMS patch to duplicate collection entries
diff --git a/server/modules/core/Collections/Controller/Api.php b/server/modules/core/Collections/Controller/Api.php
index 7c8c381..5fda5b3 100755
--- a/server/modules/core/Collections/Controller/Api.php
+++ b/server/modules/core/Collections/Controller/Api.php
@@ -104,6 +104,40 @@ public function duplicate(){
return false;
}
+ public function duplicateEntry (){
+ $collection = $this->param("collection", null);
@mcrider
mcrider / Gulpfile.js
Created May 21, 2015 19:40
Gulpfile for Apostrophe CMS -- Enables BrowserSync for live reloading (+ more) and compiles Sass into the main stylesheet
var gulp = require('gulp');
var nodemon = require('gulp-nodemon');
var jshint = require('gulp-jshint');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var notifier = require('node-notifier');
var uglify = require('gulp-uglify');
var sequence = require('run-sequence');
var util = require('gulp-util');
@mcrider
mcrider / gist:7e8d5c2a3b042e87f183
Created July 23, 2014 21:45
z-indexes in sass maps
$z-index: (
modal : 200,
navigation : 100,
footer : 90,
triangle : 60,
navigation-rainbow : 50,
share-type : 41,
share : 40,
);
@mcrider
mcrider / content.yml
Created March 11, 2014 19:57
A rough overview of how custom modules would be implemented in the project side of an rCMS site.
# This is essentially the same file as the block (cell) descriptor file.
# Its purpose is to define custom content types and the fields they contain.
# This file would live in the project's app/custom_modules/rcms/directory
# Actual implementation may vary.
custom_modules:
- name: Doctor
action: doctor
description: A doctor custom content type
settings:
@mcrider
mcrider / bookingController.js
Created November 2, 2013 02:59
location hacking
function getURLParameter(name) {
return decodeURI(
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]
);
}
document.ready(
// assuming url like: foo.html?name="123"
@mcrider
mcrider / gist:7225326
Created October 30, 2013 00:43
bash_profile
# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2)" scp sftp ssh
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
local BLUE="\[\033[0;34m\]"
local RED="\[\033[0;31m\]"
@mcrider
mcrider / wufoo-custom.css
Created October 29, 2013 19:28
Wufoo Custom CSS
/* - - - - - - - - - - - - - - - - - - - - -
Title : Custom CSS by THo
URL : http://halemakua.com
Last Updated : October 23, 2013
- - - - - - - - - - - - - - - - - - - - - */
body {
#news {
background: url('bg-birdofparadise.jpg') no-repeat center bottom;
box-shadow: 0 10px 10px -1px rgba(50, 50, 50, 0.05);
h2.single {
margin-top: 20px;
padding-bottom: 30px;
}
.post {
border-bottom: 1px solid $border-grey;
@mcrider
mcrider / slide.html.slim
Last active December 25, 2015 17:29
slide block
li class="#{@block.settings[:class]}"
- unless @block.settings[:text].blank?
.slide-copy
p == @block.settings[:text]
a class="btn btn-#{@block.settings[:button_color]}" href="#{@block.settings[:link_url]}"
= @block.settings[:link_text]
- if @block.block_cover
= image_tag(@block.block_cover.url, alt: @block.name)