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
| check process redis-server | |
| with pidfile "/var/run/redis/redis-server.pid" | |
| start program = "/etc/init.d/redis-server start" | |
| stop program = "/etc/init.d/redis-server stop" |
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
| check process nginx with pidfile /var/run/nginx.pid | |
| start program = "/etc/init.d/nginx start" | |
| stop program = "/etc/init.d/nginx stop" |
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
| check process sshd with pidfile /var/run/sshd.pid | |
| start program "/etc/init.d/ssh start" | |
| stop program "/etc/init.d/ssh stop" |
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
| check process your_project_unicorn | |
| with pidfile /your_project_unicorn/current/tmp/pids/unicorn.pid | |
| start program = "/bin/bash -l -c 'cd /your_project_unicorn/current && bundle exec unicorn -E staging -c /your_project_unicorn/current/config/unicorn.rb -D'" | |
| stop program = "/bin/bash -l -c kill -QUIT `cat /your_project_unicorn/current/tmp/pids/unicorn.pid` |
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
| check process your_project_sidekiq | |
| with pidfile /your_project/current/tmp/pids/sidekiq.pid | |
| start program = "/bin/bash -l -c 'cd /your_project/current && bundle exec sidekiq -e staging -C config/sidekiq.yml -d -P tmp/pids/sidekiq.pid -L log/sidekiq.log'" | |
| stop program = "/bin/bash -l -c kill -s TERM `cat /your_project/current/tmp/pids/sidekiq.pid`" |
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 Rails.env.production? | |
| @viva_url = "https://www.vivapayments.com" | |
| @rest = RestClient::Resource.new "#{@viva_url}/api/orders", :user => "user_id4", :password => "password" | |
| else | |
| @viva_url = "http://demo.vivapayments.com" | |
| @rest = RestClient::Resource.new "#{@viva_url}/api/orders", :user => "user_id", :password => "password" | |
| end | |
| email = @order.email | |
| phone = @order.phone |
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
| zX-Ji-vkP78db-pNC7tVKGT97Zff92zW5cvAvH1Ini0.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImlzc3VlZF9hdCI6MTQ0ODg3OTk0MCwicGFnZSI6eyJpZCI6IjE0NDYwNDA0MzkwMTY4MzgiLCJhZG1pbiI6dHJ1ZX0sInVzZXIiOnsiY291bnRyeSI6ImdyIiwibG9jYWxlIjoiZW5fVVMiLCJhZ2UiOnsibWluIjoyMX19fQ |
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
| {"algorithm"=>"HMAC-SHA256", "issued_at"=>1448879940, "page"=>{"id"=>"1446040439016838", "admin"=>true}, "user"=>{"country"=>"gr", "locale"=>"en_US", "age"=>{"min"=>21}}} |
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
| <%= FBGraph::Canvas.parse_signed_request(your_fb_app_secret_key, params[:signed_request]) %> |
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 query() { | |
| var | |
| total = 0, shown = 0, | |
| // HN is done with very unsemantic classes. | |
| job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')), | |
| query_list = Array.prototype.slice.call(arguments); | |
| // This traverses up the dom stack trying to find a match of a specific class | |
| function up_to(node, klass) { | |
| if (node.className === klass) { |