Skip to content

Instantly share code, notes, and snippets.

View shrop's full-sized avatar
👋

Mark Shropshire shrop

👋
View GitHub Profile
@shrop
shrop / CrashPlan Pause-Resume.scpt
Created March 29, 2014 20:46
CrashPlan Pause/Resume
set isCrashPlanRunning to false
try
set pid to do shell script ¬
"sudo launchctl list | grep com.crashplan.engine" user name "username" password ¬
"password" with administrator privileges
set isCrashPlanRunning to true
end try
if isCrashPlanRunning then
log "CrashPlan is already running: " & pid
/**
* Implements hook_classic().
*/
@shrop
shrop / apm.js
Last active August 29, 2015 14:01
Start Meteor APM Only on One Specific Instance of a Meteor Application
Meteor.startup(function() {
// Start APM only on our test server.
var rootUrl = Meteor.absoluteUrl();
if (rootUrl === "https://<rootUrl>/" || rootUrl === "http://<rootUrl>/") {
Apm.connect('<AppId>', '<AppSecret>');
}
});
@shrop
shrop / gist:24ab107aaff7c90990bb
Last active August 29, 2015 14:03
Turn on Drupal site maintenance and set the message
drush vset maintenance_mode 1
drush vset maintenance_mode_message 'Come back later!'
@shrop
shrop / gist:7969833edd26ae52eacd
Last active August 29, 2015 14:04
Declare a schema and collection at the same times! #meteorjs
Posts = new Meteor.Collection("posts", {
schema: new SimpleSchema({
title: {
type: String,
optional: true
},
description: {
type: String,
optional: true
},
@shrop
shrop / gist:231f92296b3137eb0e32
Created August 9, 2014 22:09
Example library usage for drush make files
libraries[jquery_ui][download][type] = get
libraries[jquery_ui][download][url] = http://jquery-ui.googlecode.com/files/jquery.ui-1.6.zip
libraries[jquery_ui][directory_name] = jquery.ui
libraries[jquery_ui][destination] = modules/contrib/jquery_ui
#!/bin/zsh
rm -rf "$HOME/Library/Preferences/WebIde70"
rm -rf "$HOME/Library/Caches/WebIde70"
rm -rf "$HOME/Library/Application Support/WebIde70"
rm -rf "$HOME/Library/Logs/WebIde70"
<!--
The examples below illustrate different ways to make a reactive and nonreactive join between two collections.
We will retrieve in all of them a list of the 10 most popular posts along with their author profile.
More informations are available on: http://journal.gentlenode.com/
Summary:
1. Nonreactive Join #1: Denormalization.
2. Reactive Join #1: Joining on the client. (by calling a publication)
3. Reactive Join #2: Overpublishing. (and joining with data context)
@shrop
shrop / smart.lock
Created September 9, 2014 00:11
smart.lock for spectacle-frontend
{
"meteor": {},
"dependencies": {
"basePackages": {
"iron-router": {},
"famono": {},
"famous-components": {},
"less-bootstrap-3": {},
"font-awesome-4-less": {}
},
@shrop
shrop / gist:71824d3aca6c851fbc57
Created September 9, 2014 11:41
Spectacle frontend install
➜ ~ cd ~/Desktop
➜ Desktop git clone [email protected]:shrop/spectacle-frontend.git
Cloning into 'spectacle-frontend'...
remote: Counting objects: 203, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 203 (delta 2), reused 0 (delta 0)
Receiving objects: 100% (203/203), 111.53 KiB | 0 bytes/s, done.
Resolving deltas: 100% (63/63), done.
Checking connectivity... done.