Skip to content

Instantly share code, notes, and snippets.

View jlstr's full-sized avatar

José Estrella-Campaña jlstr

View GitHub Profile
deploy@ln-tiptotem-dev:~/work/tiptotem/current$ bundle exec sidekiq -e production
2014-01-28T02:54:56Z 18064 TID-1awufc INFO: Booting Sidekiq 2.17.3 with redis options {}
2014-01-28T02:54:57Z 18064 TID-1awufc INFO: Running in ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
2014-01-28T02:54:57Z 18064 TID-1awufc INFO: See LICENSE and the LGPL-3.0 for licensing details.
2014-01-28T02:54:57Z 18064 TID-1awufc INFO: Starting processing, hit Ctrl-C to stop
2014-01-28T02:54:57Z 18064 TID-1msc8y PaymentsWorker JID-f8806c41ade5fbdf929b2149 INFO: start
2014-01-28T02:54:57Z 18064 TID-1mzs9k PaymentsWorker JID-550902038b468fe9c10b6ab5 INFO: start
2014-01-28T02:54:57Z 18064 TID-1of33o PaymentsWorker JID-a12bc7a8839d74e620b5341b INFO: start
2014-01-28T02:54:57Z 18064 TID-1mqypw PaymentsWorker JID-93c9a65713a0bea5f9a2871d INFO: start
2014-01-28T02:54:57Z 18064 TID-1mqx58 PaymentsWorker JID-198f40ab881b8306677bd207 INFO: start
Started POST "/ipn_notify" for 173.0.82.126 at 2014-01-22 21:31:18 +0000
Processing by PaypalNotificationsController#ipn_notify as HTML
Parameters: {"max_number_of_payments"=>"null", "starting_date"=>"2014-01-23T00:00:00.000Z", "pin_type"=>"NOT_REQUIRED", "max_amount_per_payment"=>"50.00", "currency_code"=>"USD", "sender_email"=>"tiptotem2@tiptotem.com", "verify_sign"=>"AYSagOJAEOmkYvl-SjMuGt2WlgoKAsNoPT4BqS1ghze8zjrP3W0GDX02", "test_ipn"=>"1", "date_of_month"=>"0", "current_number_of_payments"=>"0", "preapproval_key"=>"PA-35J543363V334994W", "ending_date"=>"2015-01-17T00:00:00.000Z", "approved"=>"true", "transaction_type"=>"Adaptive Payment PREAPPROVAL", "day_of_week"=>"NO_DAY_SPECIFIED", "status"=>"ACTIVE", "current_total_amount_of_all_payments"=>"0.00", "current_period_attempts"=>"0", "charset"=>"Shift_JIS", "payment_period"=>"0", "notify_version"=>"UNVERSIONED", "max_total_amount_of_all_payments"=>"2000.00"}
WARNING: Can't verify CSRF token authenticity
------------------------------------------------
class PaypalNotificationsController < ApplicationController
def ipn_notify
if PayPal::SDK::Core::API::IPN.valid?(request.raw_post)
#logger.info("IPN message: VERIFIED")
puts "\n\n V E R I F I E D \n\n\n"
render :text => "VERIFIED"
else
#logger.info("IPN message: INVALID")
<% publish_to "/messages/#{current_user.convos.first.id}/chat" do %>
$('#message-display').append("<%= j render partial: 'shared/single_message', locals: { user: current_user } %>")
<% end %>
<!DOCTYPE html>
<html>
<head>
<title>Ninja Template</title>
<style>
body { background: #d6d6d6; }
#results li.pass { color: green; }
#results li.fail { color: red; }
</style>
</head>
@jlstr
jlstr / BalancedParentheses.cc
Created October 15, 2013 14:35
MyCodeSchool Problem #44
#include <iostream>
#include <string>
#include <vector>
using namespace std;
class BalancedParentheses {
public:
int checkBalance(string);
};
#include <iostream>
#include <string>
using namespace std;
class RowOrColSum {
public:
long long sumRowOrColumn(long, long, long, char);
};
#include <iostream>
#include <string>
#include <cmath>
using std::cout;
using std::endl;
using std::string;
void merge(int*, int, int, int);
@jlstr
jlstr / mark.js.coffee
Created December 14, 2012 21:06
So far
markup = $('<%= raw markdown @repo.user_description %>')
$('#fancybox-container').append markup
@jlstr
jlstr / index.html.erb
Created December 12, 2012 19:42
wannahelp index
<div class="row-fluid">
<div class="span3 box-holder">
<div id="center-text">
<div id="filters">
<%= search_form_for @search, url: user_wannahelp_index_path(current_user),
html: { method: :get } do |f| %>
<h4>Filters:</h4>
<%= f.label :language_eq, "Language:" %>
<%= f.select :language_eq, options_for_select(get_filter(@languages), current_value(:language_eq)), {},
{class: "input-medium"} %>