View adblock_hosts.sh
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
wget -qO- "http://winhelp2002.mvps.org/hosts.txt" "http://someonewhocares.org/hosts/zero/hosts" "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&startdate[day]=&startdate[month]=&startdate[year]=&mimetype=plaintext&useip=0.0.0.0" | grep -w ^0.0.0.0 | sed $'s/\r$//' | sort -u >> /etc/hosts |
View settings.local.patch
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
commit f1f7f92eff14a56fd3eec137b4d25f8eae8b139c | |
Author: Cameron Tod <cameron.tod@gmail.com> | |
Date: Mon Feb 17 12:32:35 2014 +0000 | |
Added local settings include, to ease debugging of memory issue. | |
diff --git a/.gitignore b/.gitignore | |
--- a/.gitignore | |
+++ b/.gitignore | |
@@ -2,4 +2,5 @@ |
View .htaccess
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
### Apache Rewrite | |
RewriteEngine on | |
# Force image styles that have local files that exist to be generated. | |
RewriteCond %{REQUEST_URI} ^/sites/([^\/]*)/files/styles/[^\/]*/public/((.*))$ | |
RewriteCond %{DOCUMENT_ROOT}/sites/%1/files/%2 -f | |
RewriteRule ^(.*)$ $1 [QSA,L] | |
# Otherwise, send anything else that's in the files directory to the | |
# production server. | |
RewriteCond %{REQUEST_URI} ^/sites/[^\/]*/files/.*$ |
View gist:9375657
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/core/core.services.yml b/core/core.services.yml | |
index c158be4..8a853fc 100644 | |
--- a/core/core.services.yml | |
+++ b/core/core.services.yml | |
@@ -110,7 +110,7 @@ services: | |
arguments: [default] | |
form_builder: | |
class: Drupal\Core\Form\FormBuilder | |
- arguments: ['@module_handler', '@keyvalue.expirable', '@event_dispatcher', '@url_generator', '@string_translation', '@?csrf_token', '@?http_kernel'] | |
+ arguments: ['@module_handler', '@keyvalue.expirable', '@event_dispatcher', '@url_generator', '@string_translation', '@?csrf_token', '@?http_kernel', '@config.factory'] |
View golocal.drush.inc
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 | |
/** | |
* @file | |
* Custom Drush integration. | |
*/ | |
/** | |
* Implements hook_drush_command(). | |
* | |
* @return |
View drupal_scan_large_cache_objects.php
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 | |
$user = ''; | |
$pass = ''; | |
$database = ''; | |
$limit = 1000000; | |
$dsn = 'mysql:dbname=' . $database . ';unix_socket=/var/run/mysqld/mysqld.sock'; | |
try { |
View ah_sync_backups.sh
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
# Download all database backups from Acquia Cloud. | |
drush @SITE.ENV ac-database-instance-backup-list SITE | grep id | head -1 | awk -F ":" '{print $2}' | xargs drush @SITE.ENV ac-database-instance-backup-download DBNAME > backup_file.sql.gz |
View reviews.xml
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
<?xml version="1.0" encoding="utf-8"?> | |
<node> | |
<node> | |
<title>It was ok</title> | |
<Rating>5</Rating> | |
<Body>One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment | |
</Body> | |
<merchant_id>12345</merchant_id> | |
</node> | |
<node> |
View sum_bundle.js
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
sum = 0; | |
// Get Bundle 2. | |
var bundle = jQuery('.editPage .pbBody').children('div')[1]; | |
jQuery('td[id*=j_id292]', bundle).each(function(index, value){ | |
line_item_cost = value.innerHTML; | |
line_item_cost = +line_item_cost.replace(/[^\d\.-]/g,''); | |
sum = sum + parseFloat(line_item_cost); | |
}); |
View bookmarklet.js
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
javascript:window.prompt('Branch name - copy to clipboard :)', 'issues/' + document.getElementsByClassName('gh-header-number')[0].innerHTML.replace(/#/, '') + '/' + document.getElementsByClassName('js-issue-title')[0].innerHTML.replace(/ /g, '-').toLowerCase()); |
OlderNewer