Skip to content

Instantly share code, notes, and snippets.

View rszrama's full-sized avatar

Ryan Szrama rszrama

View GitHub Profile
@eojthebrave
eojthebrave / entity_fields.php
Created July 1, 2021 14:54
Output a CSV file listing all fields and properties for Drupal 7 entity types to help prepare for a migration.
<?php
/**
* @file
* Create a CSV file with fields for every Drupal 7 entity type / bundle.
*
* When preparing for a Drupal 7 to Drupal 8/9 migration it can be helpful to
* perform some initial content analysis. This script creates CSV files that
* can be imported into Google Sheets etc. to help with this analysis.
*
@jaredatch
jaredatch / mailhog-mamp.md
Created January 30, 2018 21:57
Install MailHog with MAMP Pro

Install MailHog with MAMP Pro, using HomeBrew.

MailHog

First let's make sure HB is updated. Open up terminal for the following steps.

$ brew update

YYYY-MM-DD Post Mortem

Property Information
Impact Describe the impact of this incident
Status Ongoing/Resolved
Date of Incident When did this incident occur
Time Window Start and end time for this incident
Total Time How long (hours/minutes) did this incident last
JIRA Issue(s) Ticket number for any related JIRA tickets
__has_parent_dir () {
# Utility function so we can test for things like .git/.hg without firing
# up a separate process
test -d "$1" && return 0;
current="."
while [ ! "$current" -ef "$current/.." ]; do
if [ -d "$current/$1" ]; then
return 0;
fi
@andyg5000
andyg5000 / gist:7e14b4a0c478e071b12e
Last active August 29, 2015 14:24
Puphpet drupal development config for nginx
servername:
server_name: servernane.dev
www_root: /var/www/servername/www
access_log: /var/www/servername/logs/access_log
error_log: /var/www/servername/logs/error_log
listen_port: '80'
index_files:
- index.html
- index.htm
- index.php
@Seldaek
Seldaek / rant.log
Created April 17, 2015 20:54
freenode/#composer rant
03:54 -!- THEBEEFSTEAK has joined #composer
03:54 <THEBEEFSTEAK> hey guyys
03:54 <THEBEEFSTEAK> RobLoach
03:55 <THEBEEFSTEAK> sandvige
03:55 <THEBEEFSTEAK> scottrigby
03:55 <THEBEEFSTEAK> skoop
03:55 <THEBEEFSTEAK> Spea
03:55 <THEBEEFSTEAK> tonton
03:55 <THEBEEFSTEAK> tystr:
03:55 <THEBEEFSTEAK> s+e:
@BigBlueHat
BigBlueHat / jsoon.php
Last active December 20, 2015 06:49
JSOON - JSON Sans-Optional Object Notation
<?php
/**
The MIT License (MIT)
Copyright (c) 2013 Benjamin Young (aka BigBlueHat)
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
@crittermike
crittermike / gist:3503791
Last active February 2, 2019 20:11
Import gzipped MySQL DB dump but ignore data from specific tables
# REGULAR VERSION
gunzip -c db.sql.gz | grep -Ev "^INSERT INTO \`(cache_|search_|sessions|whatever)" | mysql -u root -p databasename
# DRUPAL VERSION
gunzip -c db.sql.gz | grep -Ev "^INSERT INTO \`(cache_|search_|sessions|whatever)" | drush sqlc
@katowulf
katowulf / jquery.tabslideout.1.3.js
Created May 10, 2012 20:50
jquery.tabslideout.1.3.js
/*
tabSlideOUt v1.3 (altered by katowulf)
Originally by William Paoli: http://wpaoli.building58.com
To use you must have an image ready to go as your tab
Make sure to pass in at minimum the path to the image and its dimensions:
example: