Skip to content

Instantly share code, notes, and snippets.

View nielsonm's full-sized avatar

Michael Nielson nielsonm

  • Tag 1 Consulting
  • United States
  • 02:14 (UTC -07:00)
View GitHub Profile
@nielsonm
nielsonm / gist:2776615
Created May 23, 2012 17:45
Comment depth header
<?php $depth = ($comment->depth >= 3) ? 6 : $comment->depth += 3; $header_depth = 'h' . $depth; ?>
<<?php print $header_depth; print $title_attributes; ?>><?php print $title ?><?php print '</' . $header_depth . '>'; ?>
@nielsonm
nielsonm / gist:4392027
Created December 27, 2012 21:13
Behat ShareThis
$page = $this->getSession()->getPage();
$sm_clean = strtolower(preg_replace('/\W+/', '', $social_media));
$sm_button = $page->find('css', '.sharethis-buttons .st_' . $sm_clean . ' .chicklets');
$sm_button->click();
@nielsonm
nielsonm / SassMeister-input-HTML.html
Last active August 29, 2015 14:14
Generated by SassMeister.com.
<div class="">One</div>
<div class="">Two</div>
<div class="">Three</div>
<div class="">Four</div>
<div class="">Five</div>
<div class="">Six</div>
@nielsonm
nielsonm / 0_reuse_code.js
Last active August 29, 2015 14:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@nielsonm
nielsonm / windows-character-search-replace.php
Last active October 7, 2015 17:36
Search & destroy Windoze crap characters
$search = array(
chr(0xe2) . chr(0x80) . chr(0x98),
chr(0xe2) . chr(0x80) . chr(0x99),
chr(0xe2) . chr(0x80) . chr(0x9c),
chr(0xe2) . chr(0x80) . chr(0x9d),
chr(0xe2) . chr(0x80) . chr(0x93),
chr(0xe2) . chr(0x80) . chr(0x94),
);
$replace = array(
"'",
@nielsonm
nielsonm / featuresUpdate.diff
Created November 10, 2016 05:30
Upgrading Features in drush make file
; Features
- projects[features][version] = 2.1
+ projects[features][version] = 2.2
projects[features][patch][1417630] = "http://drupal.org/files/features_static_caches-1063204-32.patch"
@nielsonm
nielsonm / fooTable.ini
Created November 10, 2016 05:32
FooTable v 2.0.1.4 drush make entry
libraries[footable][directory_name] = "FooTable"
libraries[footable][download][tag] = "V2.0.1.4"
libraries[footable][download][type] = "git"
libraries[footable][download][url] = "https://github.com/bradvin/FooTable.git"
@nielsonm
nielsonm / intro.ini
Created November 10, 2016 05:34
Drush make file intro
core = 7.x
api = 2
; Drupal Core
projects[drupal][version] = "7.33"
; =====================================
; Contrib Modules
; =====================================
; By default, store all contrib modules in the "contrib" subdirectory of
; sites/all/modules.
@nielsonm
nielsonm / make.yml
Last active November 10, 2016 05:36
GDT as a drush make yaml file
# Example makefile
# ----------------
# This is an example makefile to introduce new users of drush make to the
# syntax and options available to drush make.
# This make file is a working makefile - try it! Any line starting with a `#`
# is a comment.
# Core version
# ------------
# Each makefile should begin by declaring the core version of Drupal that all
### Keybase proof
I hereby claim:
* I am nielsonm on github.
* I am nielsonm (https://keybase.io/nielsonm) on keybase.
* I have a public key ASCrbUffJV_TYtWKHzFqfFuIUiccgQVNTEeUD9y6Gzra9wo
To claim this, I am signing this object: