Skip to content

Instantly share code, notes, and snippets.

View andypotanin's full-sized avatar
🇺🇲
Focusing

Andy Potanin andypotanin

🇺🇲
Focusing
View GitHub Profile

Market Street Wine: Extending the Aisle

Since 1979, there had been a wine shop in the basement of the 311 East Market Street apartment building in downtown Charlottesville, Virginia. When Siân Richards and Thadd McQuade purchased the store in 2018, the two were already fixtures of the iconic wine shop. McQuade started working there in 1990 and Richards in 2006. Aside from a slight name change, cleaning, and rearranging the shelves, the new owners kept Market Street Wine pretty much the same as it had been for the previous 39 years.

The next four exciting years brought a multitude of new directions: By the summer of 2022, the owners saw the tastes of wine store customers, the ways they purchased wine, the price points for both wine drinkers and producers, and supply chains shifting. For instance, natural wines had become more popular, as had rosé and sparkling wines. The COVID-19 pandemic had impacted purchasing behavior as well as supply. As Richards thought about these factors, she wondered if th

@andypotanin
andypotanin / traffic.sh
Created June 27, 2020 08:13 — forked from radu-gheorghe/traffic.sh
bash script for checking out traffic via /proc/net/dev
#!/bin/bash
#shows traffic on the specified device
function human_readable {
VALUE=$1
BIGGIFIERS=( B K M G )
CURRENT_BIGGIFIER=0
while [ $VALUE -gt 10000 ] ;do
VALUE=$(($VALUE/1000))
*.log
*.sql
sitemap.xml
sitemap.xml.gz
wp-content/backup-db/
wp-content/backups/
wp-content/blogs.dir/
wp-content/cache/
wp-content/upgrade/
wp-content/uploads/
var _thing = {};
jQuery('.student_context_card_trigger').each(function() {
var _name = jQuery(this).text().trim();
_thing[ _name ] = _thing[ _name ] || 0;
_thing[ _name ]++;
});
//_thing.sort();
//console.log(_thing);
Award Winning Firm with 750+ Clients
Your partner for digital growth
Expertly Crafted Disruption
Best of Breed Websites & Mobile APPS since 1998
Get More Customers
An Amazing Digital Experience
Supplying Arms for the Digital Revolution
Ready For Any Challenge
Website and App Design and Development
Stand Out In The Forest With Black Bear Design
@andypotanin
andypotanin / badges-_summary.md
Last active November 21, 2017 06:25
Repository Badges

Please see repository-type specific Gists for examples.

  • All repositories should have Bug, Backlog and Active (In Progress) labels via Waffle.io to hep quickly grasp state of repository.
  • Code Quality and Climate badge should be done via either Scrutinizer (PHP) or CodeClimate (JavaScript), depending on which works better.
  • Gemnasium should be used to determine status of dependencies - it works with Composer, NPM and others.
  • CircleCI should be used in most cases, keep in mind an API token is required for each repository and must be generated in CircleCI settings. This should demonstrate if the code in the repository actually works.
  • For certain repositories custom badges (NPM, Packagist, etc.) may be used as well, when applicable.

It helps to identify the type of content we will have.

  1. Content Pages - change often, most likely will have different content based on host
  2. Static Assets - scripts, styles and images. always same, even if host changes. See example #1
  3. Administrative Areas - require login and special cookies to be allowed.
  4. API and RPC - dont require cookies but should not be cached

For most dynamic pages that following headers should be allowed:

<?php
add_filter( 'postmeta_form_keys', function() { return array(); });
add_filter( 'media_library_months_with_files', function() { return array(); });
add_filter( 'media_library_show_audio_playlist', function() { return false; });
add_filter( 'media_library_show_video_playlist', function() { return false; });
#!/bin/bash
##
## curl -s -H "cache-control:no-cache" -H "pragma:no-cache" "https://gist.githubusercontent.com/andypotanin/83910a6477effe3f9e1186784c2a7206/raw/coreos.cloudinit.sh?v=1" | sudo bash;
METADATA_URL="http://169.254.169.254/computeMetadata/"
TMPFILE=$(mktemp /tmp/XXXXXX-cloud-init)
if [[ $? -ne 0 || ! -f "${TMPFILE}" ]]; then
echo "Failed to create temp file for user-data" >&2
exit 1