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
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0" class="main-table"> | |
<tr> | |
<td width="18" height="20"> </td> | |
<td width="714" valign="top"> </td> | |
<td width="18"> </td> | |
</tr> | |
<tr> | |
<td> </td> |
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
<style type="text/css"> | |
.rs-widget-container { | |
position: relative; | |
padding-bottom: 56.25%; | |
padding-top: 35px; | |
height: 100%; | |
} | |
.rs-widget-container iframe { | |
position: absolute; | |
top:0; |
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
=> #<ActiveMerchant::Billing::Response:0x007fb45c9c7878 @params={"run_sale_return"=>{"acs_url"=>nil, "auth_amount"=>"0", "auth_code"=>"000000", "avs_result"=>"No AVS response (Typically no AVS data sent or swiped transaction)", "avs_result_code"=>nil, "batch_num"=>"1", "batch_ref_num"=>"108410", "card_code_result"=>"No CVV2/CVC data available for transaction.", "card_code_result_code"=>nil, "card_level_result"=>"Unknown Code ", "card_level_result_code"=>nil, "conversion_rate"=>"0", "converted_amount"=>"0", "converted_amount_currency"=>nil, "cust_num"=>"0", "error"=>"Invalid Card Number (1)", "error_code"=>"11", "is_duplicate"=>"false", "payload"=>nil, "ref_num"=>"60056770", "result"=>"Error", "result_code"=>"E", "status"=>"Pending", "status_code"=>"P", "vpas_result_code"=>nil}}, @message={"acs_url"=>nil, "auth_amount"=>"0", "auth_code"=>"000000", "avs_result"=>"No AVS response (Typically no AVS data sent or swiped transaction)", "avs_result_code"=>nil, "batch_num"=>"1", "batch_ref_num"=>"108410", "card_code_ |
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
int sensorPin = 0; | |
int ledPin = 1; | |
int sensorVal = 0; | |
int counter = 0; | |
void setup() | |
{ | |
// strip.begin(); | |
// strip.show(); // Initialize all pixels to 'off' |
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
task :import_invoices_with_api_client => :environment do | |
begin | |
#CustomerName,CustomerPhone,Invoice Date,Invoice Subtotal,Invoice Tax,Invoice Total,Invoice Number | |
path = "#{Rails.root}/tmp/test.csv" | |
subdomain = 'ithelpdesk' | |
api = TroysAPIClient.new(subdomain,'API_KEY') | |
api.base_url = "https://#{subdomain}.repairshopr.com" |
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
@subdomain = 'subdomain' | |
@api_key = 'api_key' | |
@api_version = "/api/v1" | |
base_url = "https://#{@subdomain}.repairshopr.com" | |
subtotal = 150.00 | |
number = "12345" | |
invoice = {} | |
invoice[:date] = Time.now | |
invoice[:paid] = true |
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
<?php | |
$subdomain = 'subdomain'; | |
$api_key = 'api_key'; | |
$api_version = '/api/v1'; | |
$base_url = "https://$subdomain.repairshopr.com"; | |
$subtotal = 150.00; | |
$number = '12345'; | |
$invoice = array(); | |
$invoice["date"] = date('Y-m-d H:i: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
def locale_countries | |
countries = [] | |
countries << OpenStruct.new(name: 'Argentina', code: 'es-AR') | |
countries << OpenStruct.new(name: 'Australia', code: 'en-AU') | |
countries << OpenStruct.new(name: 'Brazil', code: 'en-BR') | |
countries << OpenStruct.new(name: 'Canada', code: 'en-CA') | |
countries << OpenStruct.new(name: 'Chile', code: 'en-CL') | |
countries << OpenStruct.new(name: 'Cyprus', code: 'en-CY') | |
countries << OpenStruct.new(name: 'Denmark', code: 'en-DK') | |
countries << OpenStruct.new(name: 'Germany', code: 'de') |
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
# How to install `ipkg` on a Synology DS214 | |
After a couple of days of trying to get `ipkg` woking on my DS214 I found [this article](https://github.com/trepmag/ds213j-optware-bootstrap) by [trepmag](https://github.com/trepmag). It is written for the DS213j, but it’s been working for me and [others](https://github.com/alberthild) for the DS214 too. | |
I have done some minor changed to clarify some things, but if you are a Linux guy (unlike me) my changes might be of no use to you. | |
## Guide | |
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
task :web_restart_based_on_memory => :environment do | |
begin | |
@client = Heroku::API.new(:api_key => ENV['HEROKU_TOKEN']) | |
app_name = 'HEROKU_APP_NAME_HERE' | |
dynos_status = @client.get_ps(app_name).body | |
#get some recent lines that are from heroku referencing web.X | |
response = open(@client.get_logs(app_name, ps: "web", source: 'heroku', 'num' => '1500').body).readlines | |
reboot_count = 0 |