Skip to content

Instantly share code, notes, and snippets.

@yec
yec / media.patch
Created January 17, 2013 01:55
commit c49692be4b1e9990bf7b01a8202 and drush on media-7.x-2.0-unstable7
diff --git a/includes/MediaBrowserUpload.inc b/includes/MediaBrowserUpload.inc
index 194c109..65e9977 100644
--- a/includes/MediaBrowserUpload.inc
+++ b/includes/MediaBrowserUpload.inc
@@ -15,7 +15,7 @@ class MediaBrowserUpload extends MediaBrowserPlugin {
* Implements MediaBrowserPluginInterface::access().
*/
public function access($account = NULL) {
- return file_entity_access('create', $account);
+ return file_entity_access('create', NULL, $account);
@yec
yec / fences.patch
Last active December 11, 2015 05:28
patch fences 1.0 fixes an issue with featured fields & install profile showing errors
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 41aeb0e..42746a1 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,8 @@
+Fences 7.x-1.x-dev, xxxx-xx-xx (development release)
+--------------------------
+- #1711490 by dalberts69: @theme_name not properly replaced in UI
+- #1561244 by RoySegall and JohnAlbin: Undefined Index (with installation profiles and features?)
+
@yec
yec / gist:4546451
Last active December 11, 2015 04:38
This commit fixes an issue with featured fields & install profile showing errors
diff --git b/fences.admin.inc a/fences.admin.inc
index e6f882a..ce29a96 100644
--- b/fences.admin.inc
+++ a/fences.admin.inc
@@ -14,32 +14,34 @@ function _fences_theme($existing, $type, $theme, $path) {
$supported_hooks = array('field');
foreach ($supported_hooks as $hook) {
- foreach ($fences[$hook] as $suggestion => $data) {
- // Manually register the suggestions for a module, but let hook_theme
@yec
yec / fontsize.js
Created October 25, 2012 03:31
fontsize
(function($) {
var min = 8;
var max = 18;
DECREASE = 1;
INCREASE = 2;
function fontSize(size) {
var dofont = function(ele) {
@yec
yec / exportsite.pl
Created March 26, 2012 11:55
Export site
#!/usr/bin/perl -w
use WWW::Mechanize;
$site = 'http://site.com/';
$username = 'username';
$password = 'password';
my $m = WWW::Mechanize->new();
@yec
yec / http_client_with_cache.coffee
Created March 26, 2012 00:34 — forked from johnthethird/http_client_with_cache.coffee
HTTPClientWithCache for Titanium in CoffeeScript
###
------> HTTPClientWithCache <------
This class is a wrapper around the standard Titanium.Network.HTTPClient(), but it adds a
few nice features:
* A cache backed by a SQLite database. All HTTPClientWithCache instances use the same database table, with
the primary cache key being a hash of the full URL (and any data parameters in a POST)
* The cache is automatically pruned before each query
* A retry mechanism, so that you can retry a particular query a number of times before failing.
@yec
yec / upload-img-to-imgur.bash
Created February 17, 2012 02:59 — forked from alvin2ye/upload-img-to-imgur.bash
upload image to imgur.bash
#!/bin/bash
# imgur script by Bart Nagel <bart@tremby.net>
# version 2
# I release this as public domain. Do with it what you will.
# Required: curl
#
# Optional: xsel or xclip for automatically putting the URL on the X selection
# for easy pasting
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
var SR = {};
var BUTTONS_COUNT = 48;
var buttons = [];
var sounds = {};
//
// create base UI tab and root window
@yec
yec / gist:1720276
Created February 2, 2012 00:03
sample function for file upload
Drupal.file = {
create : function(file_raw) {
var url = 'http://74.82.57.136/gsk/?q=api/file/create_raw';
var xhr = Titanium.Network.createHTTPClient();
xhr.onload = function() {
var file_object = JSON.parse(this.responseText);
Ti.API.log(file_object);
// Return a file info object. file_object[0].fid is the file id to reference
[INFO] [object CalendarModule] loaded
[DEBUG] configure
[DEBUG] setDates 0
[ERROR] The application has crashed with an unhandled exception. Stack trace: