Skip to content

Instantly share code, notes, and snippets.

View tsabat's full-sized avatar

Tim Sabat tsabat

View GitHub Profile
{
"product_id": "HL-104",
"product_name": "32-oz. Pail with Handle",
"description": "HumphreyLine 32-ounce pail is made with premium materials. Optional (non-decorated) White Lid available at US $0.25/CDN $0.50 (G) each. Optional Shovels also available at US $0.25/CDN $0.50 (G) each. Pail includes handle. Must specify handle color. Handles and Optional Shovels are available in: White, Red, Blue or Black. All optional accessories packed separately. Made in USA. FOB ZIP: KY, 41042",
"product_marketing_point_array": {
"product_marketing_point": {
"point_type": "downloads-Art Template",
"point_copy": "Click on the PDF link below to download: <br /><a href=\"/Lists/ReferenceMaterialLibrary/Bullet/Art_Templates/HL-104 32 oz Sand Pail.ai\" >HL-104 32 oz Sand Pail</a>"
}
},
{
"product_id": "HL-104",
"product_name": "32-oz. Pail with Handle",
"description": "HumphreyLine 32-ounce pail is made with premium materials. Optional (non-decorated) White Lid available at US $0.25/CDN $0.50 (G) each. Optional Shovels also available at US $0.25/CDN $0.50 (G) each. Pail includes handle. Must specify handle color. Handles and Optional Shovels are available in: White, Red, Blue or Black. All optional accessories packed separately. Made in USA. FOB ZIP: KY, 41042",
"product_marketing_point_array": {
"product_marketing_point": {
"point_type": "downloads-Art Template",
"point_copy": "Click on the PDF link below to download: <br /><a href=\"/Lists/ReferenceMaterialLibrary/Bullet/Art_Templates/HL-104 32 oz Sand Pail.ai\" >HL-104 32 oz Sand Pail</a>"
}
},
{
"get_configuration_and_pricing_response": {
"configuration": {
"part_array": {
"part": {
"part_id": "HL-104BK",
"part_description": "32-oz. Pail with Handle",
"part_price_array": {
"part_price": [
{
@tsabat
tsabat / nginx.conf
Last active May 2, 2018 09:13
Install nginx and phusion passenger
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
@tsabat
tsabat / order.md
Last active March 3, 2018 02:20
LunchOrder8tor

###web forms

  • read about web forms, write down what you think a web form is
  • think about all the forms that this web app will need
  • make a list of all the forms you think your app will need
  • make a list of all the fields that you think each form will have

###Web Page

  • read about web pages, how do they differ from web forms?
@tsabat
tsabat / goals.md
Last active March 3, 2018 02:17
Dorkfest
@tsabat
tsabat / install.sh
Created February 5, 2018 17:52
install docker
#!/bin/bash -x
#
# add's docker official ppa package source for Docker engine and install it
# does not include docker-compose or docker-machine
# run as root
#
# ensure we have tools to install
apt-get -y install \
apt-transport-https \

Keybase proof

I hereby claim:

  • I am tsabat on github.
  • I am tsabat (https://keybase.io/tsabat) on keybase.
  • I have a public key ASBNwh6tG_TF5UtdZENvrFyZA3TphNY0s18ICio-cmPAAAo

To claim this, I am signing this object:

@tsabat
tsabat / 1_justification.md
Last active September 16, 2017 11:06
View Counts in MySql

We store views in a single MySQL row, indexed by the redis key. Without redis in front of the DB this would cause lock contention, but redis keeps us reading/writing to the DB on the first, 10th, 25, and mod 100th read.

Without redis backing, using a single row to store counts would cause lock contention.

Using a row per view would result in slow reads on count(*) and in a write-heavy situation will cause the re-index to slow/stop replication because indexes are single-threaded.

@tsabat
tsabat / docker-xenial-copy-paste.sh
Last active September 12, 2017 05:31 — forked from BretFisher/docker-xenial-copy-paste.sh
Install Docker PPA on Ubuntu 16.04
# NOT FOR SHELL SCRIPT, but rather just for quick copy paste
# this is a copy-paste version with defaults of full shell script docker-xenial.sh
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D && \
mkdir -p /etc/apt/sources.list.d && \
echo deb https://apt.dockerproject.org/repo ubuntu-xenial main > /etc/apt/sources.list.d/docker.list && \
service lxcfs stop && apt-get remove -y -q lxc-common lxcfs lxd lxd-client && \
apt-get update -q && apt-get upgrade -y -q && \
apt-get install -y -q linux-image-extra-$(uname -r) linux-image-extra-virtual && \
apt-get install -y -q docker-engine && \