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
<?php | |
require dirname(__FILE__) . '/../vendor/autoload.php'; | |
use GuzzleHttp\Client; | |
use Symfony\Component\DomCrawler\Crawler; | |
class ImageScraper { | |
//GuzzleHttp\Client |
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
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
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
{ | |
"_token": "p2bBNWxB6WD1ZaoK4XQbmZrwtClHoU621caBuCA6", | |
"product": { | |
"status": "INACTIVE", | |
"currency": "USD", | |
"images": [ | |
], | |
"location": null, | |
"locations": [ |
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
# /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024 | |
# /sbin/mkswap /var/swap.1 | |
# /sbin/swapon /var/swap.1 |
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
class CapturingResponseFilter : Stream | |
{ | |
private Stream _sink; | |
private MemoryStream mem; | |
public APIAccessLogItem AccessLogItem { get; set; } | |
public CapturingResponseFilter(Stream sink, APIAccessLogItem item) | |
{ | |
_sink = sink; |
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
class CapturingResponseFilter : Stream | |
{ | |
private Stream _sink; | |
private MemoryStream mem; | |
public APIAccessLogItem AccessLogItem { get; set; } | |
public CapturingResponseFilter(Stream sink, APIAccessLogItem item) | |
{ | |
_sink = sink; |
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
<h2 class="page-title">Payment Result</h2> | |
<div class="main"> | |
<% if @viewdata.type.eql? 'change' %> | |
<div class="notice">Your plan was successfully changed <%= @viewdata.oldplan.blank? ? '' : 'from ' + @viewdata.oldplan + ' ' %> to <%= @viewdata.newplan.name %></div> | |
<% else if @viewdata.type.eql? 'new' %> | |
<div class="notice">You are now subscribed for the <span class="plan"> <%= @viewdata.newplan.name %></span> plan.</div> | |
<% end %> | |
<% end %> | |
<h3>Transaction Details</h3> |
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
class PaymentsController < ApplicationController | |
helper_method :time_ago_or_time_stamp | |
def new | |
@plan = Plan.find(params[:plan_id]) | |
@user = current_user | |
@amount = @plan.amount | |
end |