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
before_filter :iphone_redirect | |
def iphone_redirect | |
if request.env["HTTP_USER_AGENT"][/(Mobile\/.+Safari)/] | |
redirect_to "http://itunes.apple.com/us/app/messageparty/id386579657?mt=8" | |
end | |
end | |
describe ApplicationController do | |
it 'should redirect request from mobile safari to the app store' do |
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
// wrap selection in Trans tag | |
[ | |
{ "keys": ["super+3"], "command": "run_macro_file", "args": {"file": "Packages/User/trans.sublime-macro"} } | |
] |
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
define ['window', 'jquery.xml2json'], | |
(WindowView, xml2json) -> | |
String.prototype.trunc = | |
(n) -> | |
return @substr(0,n-1)+ (if @length > n then '...' else '') | |
class ReadingWindow extends WindowView | |
className:'reading-window' | |
template: _.template $('#reading-template').html() | |
el: '.reading' |
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
define ['event-bus', | |
'activities/utility-pane', | |
'text!templates/activities/translate-popup.jade'], | |
(EventBus, UtilityPane, translatePopupTemplate) -> | |
class TranslatePopup extends UtilityPane | |
tagName: 'li' | |
paneId: 'translate' | |
events: | |
'click .btn-search': 'sendToGoogle' | |
'click .btn-switch': 'switchLang' |
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
var createLargeSprite, createMiniSprite, createRetinas, createSmallSprite, createSprite, document, folder, forEach, hideAllLayers, layer, layers, scaleMe, showAllLayers, _i, _len; | |
folder = Folder.selectDialog(); | |
document = app.activeDocument; | |
createMiniSprite = function() { | |
var file; | |
file = new File(folder.fsName + "/" + layer.name + "-mini.png"); | |
return scaleMe(file, 50); |
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 url('http://fonts.googleapis.com/css?family=Fjalla+One|Oleo+Script+Swash+Caps:400,700|Miltonian+Tattoo|Piedra'); | |
@import "fonts.css"; | |
[class^="icon-"]{color:#808080;display:inline-block;font-family:"FontIcons";font-style:normal;font-weight:normal;line-height:1;text-align:center;vertical-align:middle;-webkit-font-smoothing:antialiased;font-size:64px;height:70px;line-height:70px;width:70px;} | |
.icon-reading:before{content:"\e206";} | |
.icon-seeing:before{content:"\e204";} | |
.icon-news:before{content:"\e101";} | |
.icon-listening:before{content:"\e203";} | |
.icon-chart:before{content:"\e208";} | |
.icon-github:before{content:"\e301";} | |
@-webkit-keyframes bounce{0%,20%,50%,80%,100%{-webkit-transform:scale(1);} 40%{-webkit-transform:scaleY(1.8);} 60%{-webkit-transform:scaleY(1.5);}}@keyframes bounce{0%,20%,50%,80%,100%{-webkit-transform:scale(1);} 40%{-webkit-transform:scaleY(1.8);} 60%{-webkit-transform:scaleY(1.5);}}.tap-window{text-align:center;margin-bottom:20px;position:relative;cursor:pointer;}.tap-window .window{posit |
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
{"1":{"points":1080,"name":"Bajoran raider"},"2":{"points":290,"name":"Basestars"},"3":{"points":940,"name":"Bebop"},"4":{"points":605,"name":"Bellerophon"},"5":{"points":410,"name":"Blackbird"},"6":{"points":350,"name":"Cardassian Pursuit"},"7":{"points":510,"name":"Colonial Viper"},"8":{"points":585,"name":"Cylon Raider"},"9":{"points":790,"name":"Death Glider"},"10":{"points":545,"name":"Destiny Ascension"},"11":{"points":415,"name":"Enterprise"},"12":{"points":825,"name":"Event Horizon"},"13":{"points":550,"name":"Federation Fighter"},"14":{"points":535,"name":"Geonosian starfighter"},"15":{"points":0,"name":"Heart of Gold"},"16":{"points":45,"name":"Horatius"},"17":{"points":0,"name":"Hyperion"},"18":{"points":0,"name":"Icarus"},"19":{"points":0,"name":"Independence"},"20":{"points":0,"name":"Jedi starfighter"},"21":{"points":0,"name":"Jem'Hadar fighter"},"22":{"points":0,"name":"Kronos Fighter"},"23":{"points":0,"name":"Magellan"},"24":{"points":0,"name":"Mayflower One"},"25":{"points":0,"name":"Minbari |
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
<html> | |
<head> | |
<style> | |
.arc path { stroke: #fff; } | |
</style> | |
<script src="https://dl.dropboxusercontent.com/u/10861681/blog-post/d3.v3.min.js"></script> | |
</head> | |
<body> | |
</body> |
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
before do | |
@twilio_number = ENV['TWILIO_NUMBER'] | |
@points_number = ENV['POINTS_NUMBER'] | |
@client = Twilio::REST::Client.new ENV['TWILIO_ACCOUNT_SID'], ENV['TWILIO_AUTH_TOKEN'] | |
puts "num: #{@twilio_number}" | |
end | |
route :get, :post, '/points' do | |
puts 'points/' | |
@phone_number = Sanitize.clean(params[:From]) |
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
# Register a subscriber through the web and send verification code | |
route :get, :post, '/sms-register' do | |
@phone_number = Sanitize.clean(params[:From]) | |
@body = params[:Body] | |
puts @error | |
if @error == false | |
user = AnonUser.first_or_create(:phone_number => @phone_number) | |
if not @body.nil? | |
user.messages.create(:body => @body) |
OlderNewer