Instantly share code, notes, and snippets.

View gist:231911a8a807bb9e188a
### Keybase proof
I hereby claim:
* I am xendk on github.
* I am xendk (https://keybase.io/xendk) on keybase.
* I have a public key whose fingerprint is 4B72 0DDB 6912 FC77 119D FDD9 8CE5 449F 949C 663D
To claim this, I am signing this object:
View challenge.php
<?php
require_once __DIR__ . '/vendor/autoload.php';
use Symfony\Component\Process\ProcessBuilder;
// This doesn't work. The stream_select inside Process doesn't see any new
// input. We want to create a stream that can be written to asyncroniouly.
$inputStream = fopen("php://temp/", 'r+');
View reload.aliases.drushrc.php
<?php
/*
* Reload site.
*/
$aliases['common'] = array(
'remote-host' => 'reload.dk',
'remote-user' => 'reload',
'path-aliases' => array(
'%drush' => '/home/reload/drush/drush',
View Guardfile
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
ignore %r{_flymake\.}
ignore %r{\.#}
guard 'livereload' do
watch(%r{\.(css|js|html)})
end
# Guard::Compass
View build_sclerosis.make
; Make file for creating a Drupal site with the sclerosis profile.
api = 2
core = 7.x
projects[drupal] = drupal
projects[drupal][overwrite] = TRUE
projects[sclerosis][type] = "profile"
projects[sclerosis][download][type] = "git"
View fix-scroll.patch
diff --git a/js/drupal.aloha.js b/js/drupal.aloha.js
index b793142..beae428 100644
--- a/js/drupal.aloha.js
+++ b/js/drupal.aloha.js
@@ -137,6 +137,10 @@ Drupal.aloha = {
var id = $alohaEditable.attr('id');
var content = Aloha.getEditableById(id).getContents();
+ // Avoid scrolling on submit by ensuring that the textarea is the
+ // same height as the Aloha editor.
View remove-hardcoded-script.patch
diff --git a/facebook_comments.module b/facebook_comments.module
index 68a1cc8..b65ea88 100644
--- a/facebook_comments.module
+++ b/facebook_comments.module
@@ -354,13 +354,6 @@ function facebook_comments_display($width, $amount, $fluid = 0) {
// Add user defined settings
$style = variable_get('facebook_comments_style', 'light');
$output = '<div id="fb-root"></div>
-<script>(function(d, s, id) {
- var js, fjs = d.getElementsByTagName(s)[0];
View metatags_quick-sql.patch
diff --git a/metatags_quick.install b/metatags_quick.install
index 71f2821..555604a 100644
--- a/metatags_quick.install
+++ b/metatags_quick.install
@@ -30,7 +30,10 @@ function metatags_quick_schema() {
'description' => 'Language code',
),
),
- 'primary key' => array('id', 'path', 'lang',),
+ 'primary key' => array('id'),