Skip to content

Instantly share code, notes, and snippets.

View sarahg's full-sized avatar
🏂

Sarah German sarahg

🏂
View GitHub Profile
@jfrederick
jfrederick / CustomDate.php
Created October 7, 2015 20:41
Drupal 8 migration process plugin
<?php
/**
* @file
* Contains \Drupal\custom_migrate\Plugin\migrate\process\CustomDate.
*/
namespace Drupal\custom_migrate\Plugin\migrate\process;
use Drupal\migrate\ProcessPluginBase;
@craychee
craychee / Are you Ready to Hire an Engineer?.md
Last active May 17, 2018 13:53
A plain English checklist to help non-technical people decide if the business is ready to engage the services of an engineer or a consulting firm. This checklist was made to accompany the following blog post: http://craychee.io/blog/2015/09/17/are-you-ready-to-hire-an-engineer/

Are you Ready to Hire an Engineer?

A plain English checklist


This checklist is intended to help non-technical people decide if the business is ready to engage the services of an engineer or a consulting firm. It is the goal of this checklist to give non-technical folks a leg up in these conversations so that they are less likely to get into lengthy (and very expensive) engagements.


###Content Content pertains to information that you already provide customers or plan to make available to anyone who comes to your site.

@trepmal
trepmal / gist:1c66dbe97e8f322bc107
Created December 19, 2014 22:42
wp-cli: reset all user passwords
#!/bin/bash
for uid in $(wp user list --field=ID)
do
pass=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32}`
wp user update $uid --user_pass="$pass"
done
@Bouke
Bouke / gist:11261620
Last active August 3, 2023 01:46
Multiple Python installations on OS X

Previous versions used homebrew to install the various versions. As suggested in the comments, it's better to use pyenv instead. If you are looking for the previous version of this document, see the revision history.

$ brew update
$ brew install pyenv
$ pyenv install 3.5.0
$ pyenv install 3.4.3
$ pyenv install 3.3.6
$ pyenv install 3.2.6
$ pyenv install 2.7.10

$ pyenv install 2.6.9

anonymous
anonymous / gist:8302198
Created January 7, 2014 16:43
<script>(function ($) {
Drupal.behaviors.apmg_audio = {
attach: function (context, settings) {
$('#apm_media_wrapper').apmplayer_ui({
playables : [
{
underwriting: Drupal.settings.apmg_audio.underwriting,
title: Drupal.settings.apmg_audio.title,
identifier: Drupal.settings.apmg_audio.uri,
<?php
/**
* @file
* Default theme implementation to display the basic html structure of a single
* Drupal page.
*
* Variables:
* - $css: An array of CSS files for the current page.
* - $language: (object) The language the site is being displayed in.
@eric1234
eric1234 / README.md
Last active May 2, 2024 08:26
Protect page with simple password

Purpose

Unauthorized access to a PHP page prompts the user for a password. Once the password is entered the original page will show.

Features

  • The access is recorded in the session so it only needs to be
@olleolleolle
olleolleolle / image_assist_fix.php
Created June 5, 2012 14:51
PHP script to convert Image Assist Tag into HTML tags
<?php
/**
* PHP script to convert Image Assist Tag into HTML tags.
*
* Drupal 6-to-7 conversion
*
* This script must be run on D7 database (after the update from D6 to D7).
* http://drupal.org/node/841568
*/
@adamgoucher
adamgoucher / webdriver_video.py
Created April 7, 2012 04:27
a basic example of using webdriver with html 5's video tag
# Copyright 2008-2009 WebDriver committers
# Copyright 2008-2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@luetkemj
luetkemj / wp-query-ref.php
Last active May 25, 2024 10:56
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/