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
{% css_asset_tag global %} | |
- /_assets/foo.css | |
- /_assets/bar.css | |
{% endcss_asset_tag %} | |
{% javascript_asset_tag global %} | |
- /_assets/foo.js | |
- /_assets/bar.js | |
{% endjavascript_asset_tag %} |
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 Object | |
def in?(array) | |
# Returns true if the Object that this is called on is included in | |
# the array passed in, otherwise returns false | |
array.include? self | |
end | |
end |
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_once('GoCardless.php'); | |
$account_details = array( | |
'app_id' => 'DUMMY_APP', | |
'app_secret' => 'INSERT_APP_SECRET_HERE', | |
'merchant_id' => 'WOQRUJU9OH2HH1', | |
'access_token' => 'INSERT_MERCHANT_ACCESS_TOKEN' | |
); |
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('lib/GoCardless.php'); | |
$account_details = array( | |
"app_id" => "XXX", | |
"app_secret" => "XXX", | |
"access_token" => "XXX" | |
); | |
GoCardless::set_account_details($account_details); |
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 | |
GoCardless::$environment = 'sandbox'; // Whilst you're testing... | |
$account_details = array( | |
'app_id' => 'app id', | |
'app_secret' => 'app secret', | |
'merchant_id' => 'merchant id', | |
'access_token' => 'access token' | |
); |
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
{ "action": "created", "bills": [ { "amount": "20.0", "amount_minus_fees": "19.8", "id": "ABCD1234", "source_id": "DCBA4321", "source_type": "subscription", "status": "pending", "uri": "https://gocardless.com/api/v1/bills/ABCD1234" } ], "resource_type": "bill" } |
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
# Configure the gem with hours of your choice, on a day-by-day basis | |
InBusiness.hours = { | |
monday: "09:00".."18:00", | |
tuesday: "10:00".."19:00", | |
# ... | |
saturday: "09:00".."12:00" | |
} | |
InBusiness.open? # => true (if now is within the set hours) | |
InBusiness.open? DateTime.parse("9th September 2013 08:00") # => false |
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 | |
// ... | |
public function cancel() { | |
$endpoint = self::$endpoint . '/' . $this->id . '/cancel'; | |
return new self($this->client, $this->client->request('put', $endpoint)); | |
} | |
public function refund() { | |
$endpoint = self::$endpoint . '/' . $this->id . '/refund'; | |
return new self($this->client, $this->client->request('post', $endpoint)); |
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
Hello, | |
We're writing about #111-8797241-1992259 for Google Chromecast HDMI Streaming Media Player. We recently learned of an error that allowed this item to be available to ship to international addresses. Unfortunately, this item is not currently intended for use outside of the United States. Outside of the United States, all of the functionality of this item may not be available and the manufacturer's warranty is void. We're sorry for any inconvenience this causes. | |
You don't need to take any action if you still want to receive the item. If your order hasn’t shipped yet, you can cancel it by going to Your Account and clicking the "Your Orders" button: | |
http://www.amazon.com/your-account | |
If your order has shipped and you would like to return the item, you'll find return instructions at the link below. We'll refund you in full, including the return shipping costs. |
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
# LSE Renew-o-matic | |
# Renew books you've taken out from the library at LSE (the British Library of Political | |
# and Economic Science) just by running a Ruby script | |
# | |
# Step 1: Install the gem dependencies | |
# $ gem install terminal-table mechanize | |
# Step 2: Run, and you'll get a beautiful table at the end with the results! | |
require 'terminal-table' | |
require 'mechanize' |
OlderNewer