Skip to content

Instantly share code, notes, and snippets.

View duellj's full-sized avatar

Jon Duell duellj

View GitHub Profile
@duellj
duellj / import_panel_pages_to_db.php
Last active October 12, 2016 17:45
Remove page manager pages from code
<?php
ctools_include('export');
// Get page manager definition. This could be from a
// hook_default_page_manager_pages(). It's important to remove that function
// though or page will show as "overridden".
$pages = _pages_for_import_to_db();
foreach ($pages as $page) {
diff --git a/select2.module b/select2.module
index 3fc4909..2519115 100644
--- a/select2.module
+++ b/select2.module
@@ -1179,11 +1179,11 @@ function _select2_set_exuled_for_settings() {
}
-// if ($select2_settings['select_2']['excludes']) {
+ if ($select2_settings['select_2']['excludes']) {
diff --git a/public/sites/all/modules/features/navex_base/css/gated-status.css b/public/sites/all/modules/features/navex_base/css/gated-status.css
new file mode 100644
index 0000000..c09457e
--- /dev/null
+++ b/public/sites/all/modules/features/navex_base/css/gated-status.css
@@ -0,0 +1,7 @@
+#toolbar-gated {
+ float: left;
+ margin: -5px 0 -10px 0;
+ padding: 5px;
@duellj
duellj / 0_reuse_code.js
Last active August 29, 2015 14:27
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
diff --git a/css/media.css b/css/media.css
index 92df514..0873b28 100644
--- a/css/media.css
+++ b/css/media.css
@@ -73,7 +73,6 @@
}
.media-item img {
- height: auto;
margin-bottom: 10px;
@duellj
duellj / gist:9957265
Last active August 29, 2015 13:58
Patch for Media alpha1 and jQuery 1.10
diff --git a/css/media.css b/css/media.css
index 92df514..0873b28 100644
--- a/css/media.css
+++ b/css/media.css
@@ -73,7 +73,6 @@
}
.media-item img {
- height: auto;
margin-bottom: 10px;
@duellj
duellj / gist:5827432
Last active December 18, 2015 18:39
Drupal.org patch rerolls
# Create a branch at a date near patch creation
git co -b issue-x `git log -1 --before=[date of patch, e.g. 6/1/2013] --format=format:%h`
# Apply patch and commit
curl [patch url] | patch -p1
git add -A .
git ci -m 'Patch from #comment'
# Rebase to current 8.x HEAD
git rebase 8.x
<?php
/**
* Implements hook_node_presave().
*/
function ombuprofile_node_presave($node) {
if (isset($node->devel_generate)) {
switch ($node->type) {
$node->title = 'asldfkj alsdkfja lsdkfj';
$node->field_blog[LANGUAGE_NONE][0]['tid'] = STATE_NATIONAL_TERM_TID;
<?php
function stand_main_preprocess_maintenance_page(&$variables) {
if (MAINTENANCE_MODE == 'error') {
$variables['template_files'][] = 'error-page.tpl.php';
}
}