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
| # added a new before_validation | |
| PhoneNumber.all { |p| p.save! } | |
| # doesn't resave the data... silly me | |
| ActiveRecord::Base.partial_updates = false | |
| PhoneNumber.all { |p| p.valid?; p.save! } |
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
| klass = Paperclip::Storage::Filesystem | |
| klass.module_eval do | |
| def flush_writes #:nodoc: | |
| logger.info("[paperclip-hack] Writing files for #{name}") | |
| @queued_for_write.each do |style, file| | |
| file.close | |
| FileUtils.mkdir_p(File.dirname(path(style))) | |
| logger.info("[paperclip-hack] -> #{path(style)}") | |
| FileUtils.cp(file.path, path(style)) |
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
| this is a test |
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
| foo foo foo.This is a test |
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
| html { | |
| background: none; | |
| } | |
| body { | |
| margin: 0px; | |
| background: none; | |
| } |
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
| <div id="tools"> | |
| <ul class="toolbar" id="left"> | |
| <li>Testing</li> | |
| </ul> | |
| <ul class="toolbar" id="right"> | |
| <li id="close_button"><a id="close" href="#">Close</a></li | |
| </ul> | |
| </div> | |
| <div id="disclaimer"> | |
| <h1> Disclaimer</h1> |
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
| RewriteEngine on | |
| RewriteRule ^/s/(.*)$ http://eyestreet.com.shortswitch.com/$1 [R,L] |
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
| <style type="text/css" media="screen"> | |
| #shortswitch-it .box { | |
| border:1px solid #999; | |
| text-align:center; | |
| margin:20px 60px; | |
| padding: 10px; | |
| } | |
| .shortswitch-response-box { | |
| background-color:#aaa; | |
| margin:10px auto; |
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(){var s=document.createElement("script"); | |
| s.charset="UTF-8"; | |
| s.type="text/javascript"; | |
| s.src="http://shortswitch.com/admin/marklet/tweetie/APIKEY"; | |
| document.body.appendChild(s);})(); |
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
| set the ClipURL to urlencode(the clipboard as string) | |
| set curlCMD to ¬ | |
| "curl --stderr /dev/null \"http://api.shortswitch.com/shorten?apiKey=YOUR_API_KEY&url=" & ClipURL & "\"" | |
| do shell script curlCMD | |
| set theResult to the result |