Skip to content

Instantly share code, notes, and snippets.

View carbone's full-sized avatar

John Carbone carbone

View GitHub Profile
#!/bin/bash
folder="$HOME/Desktop/mp3s"
echo "Many sites are supported. Check this list: https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md"
echo -n "Enter URL and press [ENTER]: "
read url
list='&list='
if [[ "$url" == *"$list"* ]]; then
echo -n "This looks like a playlist. Do you want to download the playlist or just one song? [p/s]: "
@carbone
carbone / locations.liquid
Last active March 15, 2019 15:25
Use in combination with Mr. Arigato https://apps.shopify.com/mr-arigato-task-automator to show stock by location in a Shopify theme. See also: https://apps.bonify.io/mr-arigato-task-automator-for-shopify "Set Variant Inventory Level Metafield by Location ID (SKU required)"
{% assign loc = shop.metafields.custom_fields["locations"] | split: "|" %}
{% if loc != blank %}
<h3>Available at the following locations</h3>
<table>
{% for info in loc %}
{% assign table_item = info | split: '='%}
{% assign location_id = table_item[0] %}
{% assign location_name = table_item[1] %}
<td colspan="2"><strong>{{ location_name }}</strong></td>
{% for variant in product.variants %}
@carbone
carbone / gist:5f6cd3ab0403b82e8d11
Created July 25, 2014 15:41
Roles Example for QUI Module (referenced in documentation)
Tzo5OiJRdWlSZXBvcnQiOjE1OntzOjI6ImlkIjtzOjE6IjMiO3M6NToicXVlcnkiO086ODoic3RkQ2xhc3MiOjExOntzOjg6ImRhdGFiYXNlIjtzOjc6ImRlZmF1bHQiO3M6MTI6InNlbGVjdF90YWJsZSI7czo1OiJ1c2VycyI7czoxMToiZXhwcmVzc2lvbnMiO2E6MTp7aToxO2E6Mzp7czo1OiJhbGlhcyI7czo1OiJyb2xlcyI7czo1OiJ2YWx1ZSI7czoyMzoiR1JPVVBfQ09OQ0FUKHJvbGUubmFtZSkiO3M6MTc6ImRlbGV0ZV9leHByZXNzaW9uIjtzOjY6IkRlbGV0ZSI7fX1zOjEwOiJjb25kaXRpb25zIjthOjA6e31zOjU6ImpvaW5zIjthOjI6e2k6MTthOjY6e3M6OToiam9pbl9uYW1lIjtzOjk6IkxlZnQgSm9pbiI7czo5OiJqb2luX3R5cGUiO3M6NDoibGVmdCI7czo1OiJ0YWJsZSI7czoxMToidXNlcnNfcm9sZXMiO3M6ODoibGVmdF9jb2wiO3M6OToidXNlcnMudWlkIjtzOjk6InJpZ2h0X2NvbCI7czoxNToidXNlcnNfcm9sZXMudWlkIjtzOjExOiJkZWxldGVfam9pbiI7czo2OiJEZWxldGUiO31pOjI7YTo2OntzOjk6ImpvaW5fbmFtZSI7czoxMDoiSW5uZXIgSm9pbiI7czo5OiJqb2luX3R5cGUiO3M6NToiaW5uZXIiO3M6NToidGFibGUiO3M6NDoicm9sZSI7czo4OiJsZWZ0X2NvbCI7czo4OiJyb2xlLnJpZCI7czo5OiJyaWdodF9jb2wiO3M6MTU6InVzZXJzX3JvbGVzLnJpZCI7czoxMToiZGVsZXRlX2pvaW4iO3M6NjoiRGVsZXRlIjt9fXM6NzoiZ3JvdXBieSI7czo5OiJ1c2Vycy51aWQiO3M6NToicmFuZ2UiO086ODoic3RkQ2xhc3MiOjI6
@carbone
carbone / gist:aae6f468623e0c7735fd
Last active August 29, 2015 13:57
Installing jekyll on OSX Mavericks with Xcode 5.1
###### When trying to install Jekyll with Xcode 5.1 I was getting the following error. ######
Foo:~ john$ gem install jekyll
Password:
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile