Skip to content

Instantly share code, notes, and snippets.

View shrop's full-sized avatar
👋

Mark Shropshire shrop

👋
View GitHub Profile
@bfodeke
bfodeke / Drupal: Implementing Plupload file save
Last active January 18, 2017 20:28
plupload implementation within Drupal with validators.
/**
* PLUPLOAD example form to showcase plupload.
*/
function MYMODULE_some_cool_form() {
$form['file_upload'] = array(
'#type' => 'plupload',
'#title' => t('Upload Files'),
'#required' => TRUE,
'#description' => t('Allowed file extensions: doc docx pdf tif tiff xls xlsx'),
'#upload_validators' => array(
@bfodeke
bfodeke / Add local .drush folder as a mount to vagrant
Last active July 16, 2021 13:28
Adding local .drush folder as a mount to vagrant drush
// Add a sync folder to sync local drush folder to the vm.
vagrant_synced_folders:
- local_path: ~/.drush
destination: /home/vagrant/.drush
type: nfs
create: true
@mlafeldt
mlafeldt / postmortem.md
Last active March 27, 2024 09:23
Example Postmortem from SRE book, pp. 487-491

Shakespeare Sonnet++ Postmortem (incident #465)

Date

2015-10-21

Authors

  • jennifer
  • martym
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@stubailo
stubailo / answer.md
Last active July 12, 2016 06:46
Answer to Blaze question on Crater.io

Answer to Blaze question on crater.io

https://crater.io/comments/ucDz7fibgDcJqHtFu

Many of us want Blaze 2.0 and not Angular or React. Is MDG committed to continuing the development of Blaze? If so, how? Thanks!

TL;DR: I think the best thing to do is probably build Blaze 2.0 on top of the React rendering system to get a nice developer experience while taking advantage of new tech like React Native and the React component ecosystem.

Blaze is a very interesting part of the Meteor platform, from a platform point of view. Let's look at where we are now. Here are some of the benefits of Blaze:

@patrickml
patrickml / Template
Created March 3, 2015 00:42
Meteor Joins
<template name="journal">
<div class="nav-block"></div>
<nav class="journal-nav">
<ul>
<li>
<a href="#" data-type="Design">Design</a>
</li>
<li>
<a href="#" data-type="Development">Development</a>
</li>
@bobbygrace
bobbygrace / trello-css-guide.md
Last active April 22, 2024 10:15
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@heathdutton
heathdutton / 50_purge_varnish.sh
Last active April 30, 2019 14:00
Acquia Cloud hook for flushing Varnish .com domains securely.
#!/bin/bash
#
# Cloud Hooks: code-deploy, code-update, db-copy, web-activate
# Essentially any time code or db changes are made.
#
# Purges Varnish cache for all .com domains assigned to the environment in Acquia Cloud.
site="$1"
target_env="$2"
drush_alias=$site'.'$target_env
@deekayen
deekayen / dnar.drush.inc
Created December 3, 2014 23:47
Rebuild node access permissions in Drupal 6 using drush.
<?php
/**
* @file
* Drush code to rebuild node access.
*/
/**
* Implementation of hook_drush_command().
*/
@melnikovdv
melnikovdv / setup.sh
Last active August 25, 2016 12:18
Mac OS X setup from scratch
#!/bin/sh
##### Preparations #####
#-----------------------
# Description is available at http://mlayer.org/tech/2014/11/25/setup-mac-os-x.html
# install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install caskroom/cask/brew-cask # makes available to install apps as packages
brew tap caskroom/versions # for beta version available through cask