Skip to content

Instantly share code, notes, and snippets.

View bangpound's full-sized avatar

Benjamin Doherty bangpound

View GitHub Profile
@bangpound
bangpound / tattoo.info
Created August 27, 2015 18:28
Drupal 7 tattoo module adds to `Drupal.settings` object the whole JSON representation of all viewed entities.
name = Tattoo
core = 7.x
dependencies[] = restws
@bangpound
bangpound / gist:9563200
Created March 15, 2014 07:56
whois buberzionist.com
Whois Server Version 2.0
Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.
Domain Name: BUBERZIONIST.COM
Registrar: GODADDY.COM, LLC
Whois Server: whois.godaddy.com
@bangpound
bangpound / gist:f3283c44bf234e118561
Created April 30, 2014 05:04
Run Drupal on Heroku

The filesystem in heroku is read-only and ephemeral! This is not the Drupal hosting platform of your dreams!

git clone --branch 7.x-pimple https://github.com/bangpound/drupal.git
cd drupal
heroku create
composer install
git add composer.lock
git commit -m "add composer.lock"
heroku addons:add heroku-postgresql
@bangpound
bangpound / composer.json
Created June 3, 2014 00:27
Symfony 3 directory structure in composer.json of Symfony 2.5
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/", "SymfonyStandard": "app/" }
},
"require": {
"php": ">=5.3.3",
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Untitled</title>
</head>
<body>
<script type="text/javascript" src="//www.google.com/trends/embed.js?hl=en-US&q=/m/03dvnq,+/m/0hn0l,+/m/0dp09y,+/m/0p6lz&gprop=images&cmpt=q&content=1&cid=GEO_MAP_3_1&export=5&w=500&h=530"></script>
</body>
</html>

Keybase proof

I hereby claim:

  • I am bangpound on github.
  • I am bangpound (https://keybase.io/bangpound) on keybase.
  • I have a public key whose fingerprint is C68C FB81 00BA E5DC 374E 08BD F4F0 B829 1503 3055

To claim this, I am signing this object:

diff --git a/pdf_to_image.module b/pdf_to_image.module
index cfab8c9..d2d1432 100644
--- a/pdf_to_image.module
+++ b/pdf_to_image.module
@@ -59,7 +59,7 @@ function pdf_to_image_field_widget_settings_form($field, $instance) {
$options = array();
foreach ((array) $fields as $field) {
$field_info = field_info_field($field['field_name']);
- if ($field_info['type'] == 'image') {
+ if (in_array($field_info['type'], array('file', 'image'))) {
diff --git a/file_entity.file_api.inc b/file_entity.file_api.inc
index 85309eb..15fa5fe 100644
--- a/file_entity.file_api.inc
+++ b/file_entity.file_api.inc
@@ -160,6 +160,14 @@ function file_build_content($file, $view_mode = 'full', $langcode = NULL) {
// Remove previously built content, if exists.
$file->content = array();
+ // Allow modules to change the view mode.
+ $context = array(
diff --git a/app/index.html b/app/index.html
index c63ec15..673e360 100644
--- a/app/index.html
+++ b/app/index.html
@@ -14,6 +14,7 @@
<!-- bower:css -->
<link rel="stylesheet" href="bower_components/jquery-mobile/css/themes/default/jquery.mobile.css" />
<link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.css" />
+ <link rel="stylesheet" href="bower_components/isteven-angular-multiselect/angular-multi-select.css" />
<!-- endbower -->
diff --git a/app/index.html b/app/index.html
index 6ae0c13..5616fa4 100644
--- a/app/index.html
+++ b/app/index.html
@@ -12,7 +12,6 @@
<!-- build:css(.) styles/vendor.css -->
<!-- bower:css -->
- <link rel="stylesheet" href="bower_components/jquery-mobile/css/themes/default/jquery.mobile.css" />
<link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.css" />