Skip to content

Instantly share code, notes, and snippets.

Paperclip::Attachment.default_options[:url] = ':http://bindery-assets.s3.amazonaws.com'
Paperclip::Attachment.default_options[:s3_host_name] = 's3-us-east-2.amazonaws.com'
config.paperclip_defaults = {
storage: :s3,
s3_host_name: "s3-us-east-2.amazonaws.com",
s3_credentials: {
bucket: ENV["AWS_S3_BUCKET"],
access_key_id: ENV["AWS_ACCESS_KEY_ID"],
secret_access_key: ENV["AWS_SECRET_ACCESS_KEY"],
s3_region: ENV['us-east-1']
}
}
@gabekelley
gabekelley / userstyle.css
Created February 4, 2016 15:52
Quick and dirty user style for a fluid.app instance of threesjs.com
.header,
.footer {
display: none;
}
.game .next {
left: 0 !important;
top: -150px !important;
}
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
$(function(){
var $progressBar = $('.progress-pie-chart');
var percent = parseInt($progressBar.data('percent'));
var deg = 360*percent/100;
if (percent > 50) {
$progressBar.addClass('gt-50');
}
$('.ppc-progress-fill').css('transform','rotate('+ deg +'deg)');
});
$.each($('textarea'), function() {
var offset = this.offsetHeight - this.clientHeight;
var resizeTextarea = function(el) {
$(el).css('height', 'auto').css('height', el.scrollHeight + offset);
};
$(this).on('keyup input', function() { resizeTextarea(this); });
});
@gabekelley
gabekelley / form.html
Created May 7, 2015 13:29
Contenteditable -> Hidden textarea
<form action='whatever' onsubmit='return copyContent()'>
@gabekelley
gabekelley / index.html
Last active August 29, 2015 14:11
Break underline
<a href="#" class="a.underline-link">
@gabekelley
gabekelley / DIrections
Last active August 29, 2015 14:06
Get rid of ST3 Sidebar Icons
Install this package: https://github.com/skuroda/PackageResourceViewer
Open the Command Palette: Shift - Option - P
'Open Package'
'[theme-name].sublime-theme'
Copy JSON from [theme-name].sublime-theme below
select {
border: 0 !important;
-webkit-appearance: none;
-moz-appearance: none;
border-radius: 0;
width: 100%;
background-color: white;
background: image-url("your-image.png") no-repeat right;
text-indent: 0.01px;
text-overflow: hidden;