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
deployer ALL = (ALL:ALL) ALL | |
deployer ALL=NOPASSWD:/bin/cp /tmp/unicorn_init /etc/init.d/unicorn_rails_example | |
deployer ALL=NOPASSWD:/etc/init.d/unicorn_rails_example start | |
deployer ALL=NOPASSWD:/etc/init.d/nginx reload | |
deployer ALL=NOPASSWD:/bin/ln | |
deployer ALL=NOPASSWD:/bin/cp |
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 HomeController < ApplicationController | |
def switch | |
tracking_id = Rails.application.secrets.ga_tracking_id | |
url = Rails.application.secrets.url | |
Gabba::Gabba.new(tracking_id, url).page_view("pc/mobile switch page", "/") | |
user_agent = UserAgent.parse(request.user_agent) | |
if user_agent.mobile? | |
redirect_to mobile_index_path({s: params[:s]}) | |
else | |
redirect_to home_index_path({s: params[:s]}) |
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
[Thu Mar 06 13:25:56 2014] [error] get_interpreter: no interpreter callback found. | |
[Thu Mar 06 13:25:56 2014] [error] [client 131.253.24.4] python_handler: Can't get/create interpreter. | |
[Thu Mar 06 13:26:00 2014] [error] make_obcallback: could not import mod_python.apache.\n | |
Traceback (most recent call last): | |
File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 29, in ? | |
import cgi | |
File "/usr/lib64/python2.4/cgi.py", line 40, in ? | |
import mimetools | |
File "/usr/lib64/python2.4/mimetools.py", line 6, in ? | |
import tempfile |
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
<script> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
ga('create', '<%= Rails.application.secrets.ga_tracking_id%>', '<%= Rails.application.secrets.url %>'); | |
ga('set', 'referrer', '<%= session[:referer] %>'); | |
ga('send', 'pageview'); | |
</script> |
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
$("#coupon_confirm").click(function(e){ | |
e.preventDefault(); | |
var url = "/" + $("#coupon_confirm").attr("data-code"); | |
$.ajax({ | |
type: 'get', | |
url: '/coupon_finish.json', | |
success: function (data) { | |
if(data.result == "finish"){ | |
alert("아쉽네요!\n다음엔 조금더 서둘러주세요~"); | |
}else{ |
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
minivertising06: | |
Data failed to compile: | |
---------- | |
No matching sls found for 'sync_cooolcool' in env 'base' | |
minivertising07: | |
Data failed to compile: | |
---------- | |
No matching sls found for 'sync_cooolcool' in env 'base' |
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
// First nominate the div to hold the Raphael svg | |
var r = Raphael("holder", 695, 600); | |
var circX = 350;//$('#outerWrapper').width() / 2, | |
var circY = 260;//$('#outerWrapper').height() / 2, | |
var circle1 = r.circle(circX, circY, 0).attr({fill:"#00FF00", 'stroke-width':0, 'opacity':'.2'}); | |
var circle2 = r.circle(circX, circY, 0).attr({fill:"#0000ff", 'stroke-width':0, 'opacity':'.2'}); | |
var circle3 = r.circle(circX, circY, 0).attr({fill:"#ff0000", 'stroke-width':0, 'opacity':'.2'}); | |
var disappear = Raphael.animation({opacity: 0}, 200, function(){ | |
circle1.remove(); |
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
// First nominate the div to hold the Raphael svg | |
var r = Raphael("holder", 695, 600); | |
var circX = 350;//$('#outerWrapper').width() / 2, | |
var circY = 260;//$('#outerWrapper').height() / 2, | |
var circle1 = r.circle(circX, circY, 0).attr({fill:"#00FF00", 'stroke-width':0, 'opacity':'.2'}); | |
var circle2 = r.circle(circX, circY, 0).attr({fill:"#0000ff", 'stroke-width':0, 'opacity':'.2'}); | |
var circle3 = r.circle(circX, circY, 0).attr({fill:"#ff0000", 'stroke-width':0, 'opacity':'.2'}); | |
var disappear = Raphael.animation({opacity: 0}, 200, function(){ | |
circle1.remove(); |
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
function user_signed_in(){ | |
}; | |
$(document).ready(function(){ | |
$('#message_button').click(function(e) { | |
e.preventDefault(); | |
$.ajax({ | |
type: 'get', | |
url: '/event_finish.json', | |
success: function (data) { |
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
['ticket_message','ticket_memo'].each do |method| | |
method_name = (method.underscore+"?").to_sym | |
send :define_method, method_name do | |
method.camelize.constantize.is_a? method.camelize.constantize | |
end | |
end | |
#TicketActivity.ticket_message? 와 같은 식으로 활용. |