Skip to content

Instantly share code, notes, and snippets.

View xendk's full-sized avatar

Thomas Fini Hansen xendk

View GitHub Profile
@xendk
xendk / metatags_quick-sql.patch
Created May 11, 2012 07:59
Sql fix for metatags-quick
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'),
@xendk
xendk / remove-hardcoded-script.patch
Created July 11, 2012 17:27
Mutilate facebook_comments.
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];
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.
; 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"
# 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
@xendk
xendk / reload.aliases.drushrc.php
Created October 24, 2014 10:02
reload.aliases.drushrc.php example
<?php
/*
* Reload site.
*/
$aliases['common'] = array(
'remote-host' => 'reload.dk',
'remote-user' => 'reload',
'path-aliases' => array(
'%drush' => '/home/reload/drush/drush',
@xendk
xendk / challenge.php
Created February 23, 2015 20:45
Challenge
<?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+');
### 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: