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
If you get this strange error: | |
Your bundle is locked to some_gem (0.10.1), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of some_gem | |
(0.10.1) has removed it. You'll need to update your bundle to a version other than some_gem (0.10.1) that hasn't been removed in order to install. | |
and running `ruby -ropen-uri -e 'eval open("https://git.io/vQhWq").read'` ends with no errors: | |
Check your time settings on your server/machine! | |
https://bundler.io/v1.17/guides/rubygems_tls_ssl_troubleshooting_guide.html |
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 | |
// If you do not add the cache key, you will get | |
// interesting results in your live environment | |
// where caching is enabled | |
function yourtheme_preprocess_node(&$vars) { | |
... | |
$textBl = $vars['content']['field_page']; | |
$delta = 0; | |
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
class Image < ActiveRecord::Base | |
belongs_to :imageable, :polymorphic => true | |
dragonfly_accessor :image | |
validates_property :format, of: :image, in: ['jpeg', 'png', 'gif'] | |
validates :image, presence: true | |
def self.cleanup | |
image_root = Dragonfly.app.datastore.root_path |
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
#import "HelpViewController.h" | |
@interface HelpViewController () | |
@end | |
@implementation HelpViewController | |
-(instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { |
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
//Modals, several fixes | |
$('.modal').on('show.bs.modal', function() { | |
$("#page input:not(:disabled), #page select:not(:disabled)").addClass('twerked').prop("disabled", true); | |
var measureScrollBar = function () { | |
var scrollDiv = document.createElement('div') | |
scrollDiv.style = 'width: 1px;height: 1px;overflow: scroll;position: absolute;top: -9999px;' | |
document.body.appendChild(scrollDiv) | |
var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth | |
document.body.removeChild(scrollDiv) |