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
#!/usr/bin/python | |
# Written by pcmanbob | |
# https://www.raspberrypi.org/forums/memberlist.php?mode=viewprofile&u=71930&sid=78c72fd5d7f7c6d39cf3b3ddcc9a0ed5 | |
# See: https://www.raspberrypi.org/forums/viewtopic.php?t=228207#p1399745 | |
# Import required Python libraries | |
import time | |
import RPi.GPIO as GPIO |
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
{ | |
"errors": [ | |
{ | |
"message": "The request failed authentication", | |
"error_code": "API_001", | |
"error_name": "Unauthenticated request" | |
} | |
] | |
} |
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
{% assign local_inv = product.variants.first.inventory_quantity %} | |
{% assign supplier_inv = product.metafields.inventory['supplier_inventory'] %} | |
{% if local_inv < 0 %} | |
{% assign local_inv = 0 %} | |
{% endif %} | |
{% if supplier_inv < 0 %} | |
{% assign supplier_inv = 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
{"labels"=>[{"request_id"=>"3255d1dd-f116-4f3e-8dc3-9a2fe5394ce8", "status"=>"PENDING", "request_date"=>"11-02-2019 13:17:22", "shipments"=>[{"shipment_id"=>"pWgK0EyLfLsAAAFozjkjhNpY", "options"=>{}}], "shipment_ids"=>["pWgK0EyLfLsAAAFozjkjhNpY"]}]} | |
"PENDING" | |
^C^C{"labels"=>[{"request_id"=>"3255d1dd-f116-4f3e-8dc3-9a2fe5394ce8", "status"=>"PENDING", "request_date"=>"11-02-2019 13:17:22", "shipments"=>[{"shipment_id"=>"pWgK0EyLfLsAAAFozjkjhNpY", "options"=>{}}], "shipment_ids"=>["pWgK0EyLfLsAAAFozjkjhNpY"]}]} | |
"PENDING" | |
{"labels"=>[{"request_id"=>"3255d1dd-f116-4f3e-8dc3-9a2fe5394ce8", "status"=>"PENDING", "request_date"=>"11-02-2019 13:17:22", "shipments"=>[{"shipment_id"=>"pWgK0EyLfLsAAAFozjkjhNpY", "options"=>{}}], "shipment_ids"=>["pWgK0EyLfLsAAAFozjkjhNpY"]}]} | |
"PENDING" | |
{"labels"=>[{"request_id"=>"3255d1dd-f116-4f3e-8dc3-9a2fe5394ce8", "status"=>"PENDING", "request_date"=>"11-02-2019 13:17:22", "shipments"=>[{"shipment_id"=>"pWgK0EyLfLsAAAFozjkjhNpY", "options"=>{}}], "shipment_ids"=>["pWgK0EyLfLsAAAFozjkj |
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
/* | |
A quick test script or the customer: | |
OUT --> A0 | |
VCC --> 5V | |
GND --> GND | |
*/ |
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
#!/usr/bin/env ruby | |
require 'sinatra' | |
post '/ws' do | |
request.body | |
end |
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
"#<HTTParty::Response:0x7fb6a18e6958 parsed_response=\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<Fault>Internal Server Error</Fault>\\n\", @response=#<Net::HTTPBadRequest 400 Bad Request readbody=true>, @headers={\"date\"=>[\"Wed, 12 Dec 2018 23:16:52 GMT\"], \"server\"=>[\"Apache\"], \"cache-control\"=>[\"no-cache, no-store, max-age=0, must-revalidate\"], \"pragma\"=>[\"no-cache\"], \"expires\"=>[\"0\"], \"strict-transport-security\"=>[\"max-age=63072000; includeSubDomains\"], \"x-xss-protection\"=>[\"1; mode=block\"], \"x-content-type-options\"=>[\"nosniff\"], \"x-frame-options\"=>[\"SAMEORIGIN\"], \"content-security-policy\"=>[\"default-src 'self'; script-src https: 'self' https://ssl.google-analytics.com *.newrelic.com bam.nr-data.net 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src https: 'self' https://ssl.google-analytics.com bam.nr-data.net; frame-src 'self' https://xtracta.unimarket.com accounts.google.com; child-src 'self' https://xtracta.unimarket.com; frame-ance |
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
import curses | |
stdscr = curses.initscr() | |
curses.cbreak() | |
stdscr.keypad(1) | |
stdscr.addstr(0,10,"Hit 'q' to quit") | |
stdscr.refresh() | |
key = '' | |
while key != ord('q'): |
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
// constants won't change. They're used here to set pin numbers: | |
const int buttonPin = 2; // the number of the pushbutton pin | |
const int button1Pin = 3; // the number of the pushbutton pin | |
const int ledPin = 13; // the number of the LED pin | |
const int buzzerPin = 9; // buzzer to arduino pin 9 | |
// variables will change: | |
int buttonState = 0; // variable for reading the pushbutton status | |
int button1State = 0; // variable for reading the pushbutton status |
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
500 Internal Server Error | |
Sorry, something went wrong. | |
A team of highly trained monkeys has been dispatched to deal with this situation. | |
If you see them, send them this information as text (screenshots frighten them): | |
APkpgMUrHPpBCHeQdKd7flYnGPVTrexzZIgAIxhwq57DU2Tc1iVbLrJZ | |
vMldJIOVr6pNLb9Fk19AlgGFXAqA-v0wd3oKjrcKvsI07lT1IOwF-ACV | |
psMjYcu2wOiR61oBzB_d9j5LCK3zZ_RXvvKZYnVj17LvTs_RGa-AdNhE | |
JcvGolrPZHQbYS6YMJj3mqOGmtpwdHuJ4Alir2hh1evh7XmA5cActvHy |