Skip to content

Instantly share code, notes, and snippets.

@tspicer
tspicer / gist:8310181
Created January 8, 2014 01:34
Changing the time on the CentOS servers
rm -f /etc/localtime
ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
@tspicer
tspicer / resize-root-volume-ec2
Created February 14, 2014 14:23
Resize Root Volume Linux on EC2
Stop the instance
Create a snapshot from the volume
Create a new volume based on the snapshot increasing the size
Check and remember the current's volume mount point (i.e. /dev/sda1)
Detach current volume
Attach the recently created volume to the instance
Access via SSH to the instance and run fdisk /dev/<volume>
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u')
@tspicer
tspicer / gist:fce40c53db64df5188e1
Created July 29, 2014 16:39
remove files without touch subdir
find /path/ -type f -print0 | xargs -0 -I file rm -f file
@tspicer
tspicer / theme
Created April 16, 2016 19:58
theme
{"last_tab":"5","theme-skin":"ascend","favicon":{"url":"","id":"","height":"","width":"","thumbnail":""},"button-styling":"rounded","theme-icon-style":"minimal","overall-bg-color":"#edeff0","overall-font-color":"#000000","back-to-top":"1","back-to-top-mobile":"0","smooth-scrolling":"0","one-page-scrolling":"1","responsive":"1","ext_responsive":"1","lightbox_script":"magnific","default-lightbox":"1","column_animation_easing":"easeOutQuart","column_animation_timing":"1000","external-dynamic-css":"0","google-analytics":"","custom-css":"","accent-color":"#5fcf80","extra-color-1":"#f1564f","extra-color-2":"#6b7a88","extra-color-3":"#333333","boxed_layout":"1","background-color":"#edeff0","background_image":{"url":"","id":"","height":"","width":"","thumbnail":""},"background-repeat":"","background-position":"","background-attachment":"","background-cover":"0","extended-theme-font":"0","navigation_font_family":{"font-family":"","font-options":"","google":"1","font-weight":"","font-style":"","subsets":"","text-transf
@tspicer
tspicer / s3etag.sh
Created December 14, 2016 04:03 — forked from emersonf/s3etag.sh
A Bash script to compute ETag values for S3 multipart uploads on OS X.
#!/bin/bash
if [ $# -ne 2 ]; then
echo "Usage: $0 file partSizeInMb";
exit 0;
fi
file=$1
if [ ! -f "$file" ]; then
#!/usr/bin/env bash
pip_url="https://bootstrap.pypa.io/get-pip.py"
agent_url="https://github.com/nginxinc/nginx-amplify-agent"
agent_conf_path="/etc/amplify-agent"
agent_conf_file="${agent_conf_path}/agent.conf"
nginx_conf_file="/etc/nginx/nginx.conf"
amplify_user=www-data
API_KEY={{NGINX_AMPLIFY_API}}
NGINX_AMPLIFY_HOST={{NGINX_AMPLIFY_HOST}}
@tspicer
tspicer / summary_ledger_report.csv
Created December 27, 2022 00:12
Amazon Summary Ledger Report
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 5.
Parameter,Description,Required?
ASIN,Unique blocks of 10 letters or numbers that identify items. ASINs are assigned by Amazon. You can find the ASIN on the product detail page.,"Not required
To generate a report for a specific product, enter the ASIN, MSKU, or FNSKU. Leaving these fields blank will generate a report for all products."
Merchant SKU,Unique identifier that you assign to products,"Not required
To generate a report for a specific product, enter the ASIN, MSKU, or FNSKU. Leaving these fields blank will generate a report for all products."
Fulfillment network SKU (FNSKU),Unique identifier that Amazon assigns to products stored in and fulfilled from an Amazon fulfillment center,"Not required
To generate a report for a specific product, enter the ASIN, MSKU, or FNSKU. Leaving these fields blank will generate a report for all products."
Aggregate report by location,"For the summary view, select Country to display inventory location by country or Fulfillment center to display inventory location by fulfi
@tspicer
tspicer / summary_ledger_report_fields.csv
Created December 27, 2022 00:16
Amazon Summary Ledger Report Fields
Name Description
Date The date the report was requested
FNKSU Unique identifier that Amazon assigns to products stored in and fulfilled from an Amazon fulfillment center
ASIN Unique blocks of 10 letters or numbers that identify items. ASINs are assigned by Amazon. You can find the ASIN on the product detail page.
MSKU Unique identifier that you assign to products
Title The title of your product
Disposition The status of the product, such as sellable or damaged
Starting warehouse balance Units that were available for this product in fulfillment centers at the start of the time period
Receipts Units that were received in shipments to fulfillment centers
Customer shipments Completed deliveries of customer orders that Amazon has fulfilled
Name Description
Date The date the report was requested
FNKSU Unique identifier that Amazon assigns to products stored in and fulfilled from an Amazon fulfillment center
ASIN Unique blocks of 10 letters or numbers that identify items. ASINs are assigned by Amazon. You can find the ASIN on the product detail page.
MSKU Unique identifier that you assign to products
Title The title of your product
Event type Type of event that caused a change in inventory, such as shipment, receipt, vendor return, warehouse transfer, adjustment, or customer return
Reference ID Transaction ID, such as a shipment ID or adjustment ID
Quantity Unit quantity for the transaction
Fulfillment center Fulfillment center where the inventory is stored
@tspicer
tspicer / ledger_report_reason_codes.csv
Created December 27, 2022 00:23
Adjustment types and reason codes
Code Type Reason Definition
6 - Damaged at Amazon fulfillment center A decrease to your carrier-damaged inventory level. This code is always followed by a P code increase to your fulfillment-center-damaged inventory level.
7 - Damaged at Amazon fulfillment center A decrease to your expired inventory level. This code is always followed by a P code increase to your fulfillment-center-damaged inventory level.
E - Damaged at Amazon fulfillment center A decrease to your sellable inventory level. This code is always followed by a P code increase to your fulfillment-center-damaged inventory level.
H - Damaged at Amazon fulfillment center A decrease to your customer-damaged inventory level. This code is always followed by a P code increase to your fulfillment-center-damaged inventory level.
K - Damaged at Amazon fulfillment center A decrease to your defective inventory level. This code is always followed by a P code increase to your fulfillment-center-damaged inventory level.
U - Damaged at Amazon fulfillment center