This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.card { | |
float: left; | |
margin: 0 16px 16px 0; | |
background: #fff; | |
border: 1px solid #eaeaea; | |
border-radius: 4px; | |
padding-left: 122px; | |
width: 300px; | |
box-sizing: border-box; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# this example 'touches' all PDFs | |
for file in $(find . -type f -iname '*.pdf') | |
do | |
echo " " > $file | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Upgrades/Installs Drupal core. Targeted at Drupal 6 | |
# Script based on gopressflow.sh | |
# @see https://gist.github.com/zerolab/4733662 | |
# | |
# * Run this script in your DRUPAL_ROOT | |
# * Backup your files before doing anything! | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pseudo code for using onbeforeunload() | |
$(window).on('unsaved', function(event) { | |
window.onbeforeunload = function() { | |
return "SOMETHING BAD if you navigate away."; | |
} | |
}).on("save", function(event) { | |
window.onbeforeunload = void(0); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Upgrades/Installs Pressflow over your Drupal installation | |
# | |
# * Must be run from your Drupal root directory | |
# * Backup your files before doing anything! | |
# * e.g. run: ./gopressflow.sh 6.38.121 | |
# | |
# You can get the exact release version from https://github.com/pressflow/6/releases | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
,;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,,'''''''''''''''. | |
,;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,,'''''''''''''''''' | |
,;;;;;;;;;;;;;;;;;;;;;;;;;;;cldxkkOkkxxdlc;;;;;;;;;;;;;;;;;;;;;;;;,,''''''''''','''''''' | |
,;;;;;;;;;;;;;;;;;;;;;;;:ox0XWMMMMMMMMMWNX0kxdc;;;;;;;;;;;;;;;;,,,'''''''';cdk00Okl,'''' | |
,;;;;;;;;;;;;;;;;;;;;;cxKWMMMMMMMMMMMMMMMMMMMWN0xl;;;;;;;;;;,,,'''''''';lkKWMMMMMMW0c''' | |
',;;;;;;;;;;;;;;;;;;:dKWMMMMMMMMMMMMMMMMMMMMMMMMMN0xl;;;;;,,'''''''';okXWMMMMMMMMMMM0:'. | |
.,;;;;;;;;;;;;;;;;;:kNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMN0xl;''''''',:oOXWMMMMMMMMMMMMMMNd'. | |
.',;;;;;;;;;;;;;;;;xWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMN0xolccoxONMMMMMMMMMMMMMMMMMMWd'. | |
.,;;;;;;;;;;;;;;;oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNWMMMMMMMMMMMMMMMMMMMMMMXl.. | |
.',;;;;;;;;;;;;;;xNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWX0OOOKNMMMMMMMMMMMMMMMMMMMM0;. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add tags to fq and facet.field fields to exclude each facet's filtering | |
// from influencing its own facet item count | |
// @see http://drupal.org/node/1446824#comment-5634040 | |
$params = $query->getParams(); | |
$fq = $params['fq']; | |
if (!empty($fq)) { | |
$facet_field = $params['facet.field']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get the home directory | |
* | |
* @see http://techblog.zabuchy.net/2012/how-to-detect-user-home-directory-php-linux-windows/ | |
*/ | |
function homedir() { | |
// getenv('HOME') isn't set on windows and generates a Notice. | |
$home = getenv('HOME'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git includes/ds.features.inc includes/ds.features.inc | |
index ba92367..96558df 100644 | |
--- includes/ds.features.inc | |
+++ includes/ds.features.inc | |
@@ -115,6 +115,9 @@ function ds_features_revert($module = NULL) { | |
foreach ($setting as $build_mode => $conf) { | |
// Remove old settings. | |
+ db_query("DELETE FROM {ds_settings} WHERE build_mode = '%s' AND module = '%s' AND type = '%s'", $build_mode, $ds_module, $object_type); | |
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc | |
index 8c5b294..2bf283a 100644 | |
--- a/includes/bootstrap.inc | |
+++ b/includes/bootstrap.inc | |
@@ -568,6 +568,13 @@ function variable_init($conf = array(), $regenerate = FALSE, $recursion_depth = | |
else { | |
if (defined('MAINTENANCE_MODE') || lock_acquire('variable_cache_regenerate')) { | |
$result = db_query('SELECT * FROM {variable}'); | |
+ // Exit here if the database went away. Do not want to pollute the cache | |
+ // with bad data. This request isn't going to end well anyway; end it |