Skip to content

Instantly share code, notes, and snippets.

View schappim's full-sized avatar
💤
Sleeping . +10GMT

Marcus S schappim

💤
Sleeping . +10GMT
View GitHub Profile
@schappim
schappim / example.liquid
Created December 23, 2020 03:42
example.liquid
{%if variant.price >= 49 %}<span>FREE SHIPPING</span>{% else %}<span>6.99 Flat Rate Shipping</span>{% endif %}
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(9, OUTPUT);
pinMode(7, OUTPUT);
pinMode(1, OUTPUT);
}
// the loop function runs over and over again forever
0815.ru
0wnd.net
0wnd.org
10minutemail.co.za
10minutemail.com
123-m.com
1fsdfdsfsdf.tk
1pad.de
20minutemail.com
21cn.com
@schappim
schappim / poboxes.rb
Created October 12, 2020 21:01
Regex to Detect Australian PO Boxes / Parcel Lockers
/((p(\s|\.)*o(\s|\.)*box|\(box(\s|\.))|lpo(\s|\.)|^box(\s|\.)|post(\s|\.)office\W|(Parcel|Collect|locker|Newsagency|locked\Wbag)\W)/i
@schappim
schappim / disposable-email-provider-domains
Last active October 10, 2020 03:10
List of disposable email provider domains
0815.ru
0wnd.net
0wnd.org
10minutemail.co.za
10minutemail.com
123-m.com
1fsdfdsfsdf.tk
1pad.de
20minutemail.com
21cn.com
/*
SD card test
This example shows how use the utility libraries on which the'
SD library is based in order to get info about your SD card.
Very useful for testing a card when you're not sure whether its working or not.
The circuit:
* SD card attached to SPI bus as follows:
** MOSI - pin 11 on Arduino Uno/Duemilanove/Diecimila
require 'httparty'
require 'csv'
response = HTTParty.get 'https://docs.google.com/spreadsheets/d/1lN8dXM9y-8GwXsmMnQzYiLHypk2DvWzUAuagWM8YihI/export?format=csv'
csv = CSV.parse(response.body)
sku_tag_mapping = {}
csv.each_with_index do |row, index|
sku_tag_mapping = {
'HLO-TCCC-ST':'Twin',
'HLO-QCCC-ST':'Full/Queen',
'HLO-KCCC-ST':'King',
'HLO-TCPC-ST':'Twin',
'HLO-QCPC-ST':'Full/Queen' #etc etc...
}
order = ShopifyAPI::Order.last
puts "\nProcessing Order:"
order = ShopifyAPI::Order.last
puts "\nProcessing Order:"
url_to_order = "https://resthouse.myshopify.com/admin/orders/#{order.id}"
url_to_customer = "https://resthouse.myshopify.com/admin/customers/#{order.customer.id}"
puts "<a href=\"#{url_to_order}\" target=\"_blank\">#{url_to_order}</a><br>"
customer = ShopifyAPI::Customer.find order.customer.id
order.line_items.each do |line|