Skip to content

Instantly share code, notes, and snippets.

View do-i's full-sized avatar

Joji Doi do-i

  • Ninjump
  • Holland, MI
View GitHub Profile
@do-i
do-i / activate.sh
Last active July 19, 2020 20:49
Activate network and enable ssh server
sudo tee /etc/network/interfaces <<EOT
allow-hotplug enp0s3
iface enp0s3 inet dhcp
allow-hotplug enp0s8
iface enp0s8 inet dhcp
EOT
sudo ifup enp0s3
sudo ifup enp0s8
sudo apt update
{
"fromAddress": {
"company": "Costco",
"name": "Costco",
"street1": "800 Lake Dr",
"street2": "",
"city": "Issaquah",
"state": "WA",
"zipCode": "98027",
"country": "US",
### Post Zendesk (Prototype)
POST {{base_url}}/v1/shipping-authorization/submit
Authorization: Bearer {{access_token}}
Content-Type: multipart/form-data; boundary=MyBoundary
--MyBoundary
Content-Disposition: form-data; name="vendorName";
Moda
--MyBoundary
{
"styleNumber": "8298 FW19",
"styleName": "Hubba Bubby",
"vendorColor": "blue",
"skus": [
{
"skuNumber": "3006190",
"skuSize": "OS",
"quantity": 6,
"quantityReceived": 0,
{
"timestamp": 1581455906202,
"status": 500,
"error": "Internal Server Error",
"message": "[{\"2420429\":\"Over requested: requested: 100, available: 8\"},
{\"2420428\":\"Over requested: requested: 1000, available: 100\"}]",
"path": "/v1/purchase-orders/MKZ-PF19-TS-US-RTW-DEL3/asn"
}
[
{
"2420429": "Over requested: requested: 100, available: 8"
},
{
"2420428": "Over requested: requested: 1000, available: 100"
}
]
@do-i
do-i / gist:02b0e47c37a67c81f0fc340408d66bca
Last active February 24, 2020 23:06
submitted_to_vendor_portal=true
SET @row_number = 0;
SELECT (@row_number:=@row_number+1) as num,
sk.sku,
po.purchase_order_number,
vs.color,
poi.variant_id,
vs.name,
vs.style_code,
poi.size,
poi.received_quantity,
allow-hotplug enp0s3
iface enp0s3 inet dhcp
allow-hotplug enp0s8
iface enp0s8 inet dhcp
@do-i
do-i / gist:50a092c10518b9c9e39660d6714342e1
Created February 5, 2020 23:46
join skus table to get string SKU
SELECT
sk.sku,
po.purchase_order_number,
vs.color,
vs.name,
vs.style_code,
poi.size,
poi.received_quantity,
poi.quantity
{
"authorization": {
"groups": [
"VP - vendor user"
],
"roles": [
"Vendor User"
],
"permissions": [
"read:po",