This file contains hidden or 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
fixFlashMargin: => | |
$recorder = @modalContainer().find('.asset_editor_modal_container object') | |
offset = $recorder.offset() | |
$recorder.offset | |
top: Math.round(offset.top) | |
left: Math.round(offset.left) | |
# https://github.com/tombigel/detect-zoom | |
# Apparently detect-zoom is no longer reliable |
This file contains hidden or 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
(function (con) { | |
// the dummy function | |
function dummy() {}; | |
// console methods that may exist | |
for(var methods = "assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(','), func; func = methods.pop();) { | |
con[func] = con[func] || dummy; | |
} | |
}(window.console = window.console || {})); | |
// we do this crazy little dance so that the `console` object | |
// inside the function is a name that can be shortened to a single |
This file contains hidden or 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
Request URL:http://d2l5dw7ow11yzt.cloudfront.net/339/254/0.5-0.5/assets/images/51b24a2054b709630c000024.jpg | |
Response Headers: | |
Age: 162 | |
Cache-Control: public, must-revalidate, max-age=2592000 | |
Connection: keep-alive | |
Content-Disposition: inline | |
Content-Length: 0 | |
Content-Type: image/jpeg | |
Date: Fri, 28 Jun 2013 11:28:58 GMT | |
Server: nginx/1.2.3 + Phusion Passenger 3.0.11 (mod_rails/mod_rack) |
This file contains hidden or 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
I'm not sure what the problem is, but let me present my observations: | |
Started with no paperclip version set and no dependencies on paperclip: | |
$ cat Gemfile | grep paperclip | |
gem 'paperclip' | |
$ bundle update paperclip | |
... | |
$ cat Gemfile.lock | grep paperclip | |
paperclip (3.2.1) | |
paperclip |
This file contains hidden or 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
backend example { | |
.host = "<%=http_endpoint%>"; | |
.port = "<%=http_port%>"; | |
} | |
backend s3 { | |
.host = "assets.example.me"; | |
.port = "80"; | |
} | |
backend s3staging { | |
.host = "stagingassets.example.me"; |
This file contains hidden or 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
namespace :assets do | |
desc "move precompiled assets to S3" | |
task :move_to_s3 => :environment do | |
puts "finished precompiling. beginning transfer to s3..." | |
s3 = AWS::S3.new | |
bucket = s3.buckets[APP_CONFIG[:rails_assets_bucket]] |
This file contains hidden or 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
#!/bin/bash | |
# usage: precompile_and_deploy production|staging | |
# | |
CURRENT_GIT_BRANCH=$(git branch | grep \*) | |
CURRENT_GIT_BRANCH=${CURRENT_GIT_BRANCH#\** } | |
if [[ $1 == "-m" || $1 == "--migrate" ]]; then | |
MIGRATE=true | |
RAILS_ENV=$2 | |
else |
This file contains hidden or 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
javascript:(function()%7Bvar%20_grid_height=20;if(window.baseliner)%7Bbaseliner.toggle();%7Delse%7Bvar%20_already_loaded=document.getElementById('baseliner-script');if(_already_loaded)%7Breturn;%7D;var%20_baseliner=document.createElement('script');_baseliner.id='baseliner-script';_baseliner.type='text/javascript';_baseliner.src='http://files.keyes.ie/baseliner-latest.min.js';document.getElementsByTagName('body')%5B0%5D.appendChild(_baseliner);var%20loadFunction=function(evt)%7Bif(window.baseliner)%7Breturn;%7D;baseliner=new%20Baseliner(_grid_height);baseliner.toggle();%7D;_baseliner.onreadystatechange=loadFunction;_baseliner.onload=loadFunction;%7D;%7D)(); |
This file contains hidden or 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
Show hidden characters
[ | |
{ "keys": ["ctrl+space"], "command": "exit_insert_mode", | |
"context": | |
[ | |
{ "key": "setting.command_mode", "operand": false }, | |
{ "key": "setting.is_widget", "operand": false } | |
] | |
}, | |
{ "keys": ["s"], "command": "save", "context": [{"key": "setting.command_mode"}] }, |
This file contains hidden or 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 (typeof(window.postMessage) == 'function') { | |
window.frames['frame_name'].postMessage(message, '*'); | |
} else if (typeof(window.postMessage) == 'object') { | |
window.setTimeout(function() { | |
window.frames['frame_name'].postMessage(message, '*') | |
}, 0); | |
} | |
if (typeof window.postMessage == 'function') { | |
window.removeEventListener('message', receiveMessage, false); |