Skip to content

Instantly share code, notes, and snippets.

@steveosoule
steveosoule / Nework_throttling_profiles.md
Created January 12, 2024 18:27 — forked from theodorosploumis/Nework_throttling_profiles.md
Web development - Custom network throttling profiles
Profile download (kb/s) upload (kb/s) latency (ms)
Native 0 0 0
GPRS 50 20 500
56K Dial-up 50 30 120
Mobile EDGE 240 200 840
2G Regular 250 50 300
2G Good 450 150 150
3G Slow 780 330 200
@steveosoule
steveosoule / trap_focus.js
Last active May 22, 2022 14:24 — forked from myogeshchavan97/trap_focus.js
Code for trapping focus inside modal
// FROM: https://uxdesign.cc/how-to-trap-focus-inside-modal-to-make-it-ada-compliant-6a50f9a70700
// add all the elements inside modal which you want to make focusable
const focusableElements =
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
const modal = document.querySelector('#exampleModal'); // select the modal by it's id
const firstFocusableElement = modal.querySelectorAll(focusableElements)[0]; // get first element to be focused inside modal
const focusableContent = modal.querySelectorAll(focusableElements);
const lastFocusableElement = focusableContent[focusableContent.length - 1]; // get last element to be focused inside modal
@steveosoule
steveosoule / font-weights.md
Created May 12, 2021 21:24 — forked from lukaszgrolik/font-weights.md
Commonly used names for CSS font-weight values

unknown source

value name
100 extralight/ultralight
200 light/thin
300 book/demi/light
400 regular/normal
500 medium
600 semibold/demibold
@steveosoule
steveosoule / miva_customer_template_email.xml
Last active September 23, 2019 18:53 — forked from andrew-serrano/miva_order_template_email.xml
Manually trigger a preexisting email
<mvt:comment>
Overrides if needed
</mvt:comment>
<mvt:assign name="l.run:on_cust" value="1" />
<mvt:assign name="l.run:override_from" value="''" />
<mvt:assign name="l.run:override_reply_to" value="''" />
<mvt:assign name="l.run:override_to" value="''" />
<mvt:assign name="l.run:override_cc" value="''" />
<mvt:assign name="l.run:override_bcc" value="''" />
<mvt:assign name="l.run:override_subject" value="''" />
@steveosoule
steveosoule / front-end-curriculum.md
Created June 30, 2017 22:27 — forked from stevekinney/front-end-curriculum.md
Front-end Curriculum Draft

Module 1

  • Semantic markup
  • HTML standards mode and quirks mode
  • HTML fundamentals
    • Classes and IDs
  • CSS fundamentals
    • Selectors
    • Resets and normalizers
    • The box model
@steveosoule
steveosoule / example.xml
Created December 7, 2016 16:14 — forked from tessguefen/example.xml
Order report with dynamic headers (product codes).
<mvt:assign name="l.comma" value="asciichar('44')" />
<mvt:assign name="l.linebreak" value="asciichar('10')" />
<mvt:foreach iterator="order" array="admin_order:orders">
<mvt:foreach iterator="group" array="order:groups">
<mvt:comment> <!-- Build Dynamic Array --> </mvt:comment>
<mvt:if expr="miva_array_search( l.settings:products, 0, l.item, 'l.item:code EQ l.settings:group:code' )">
<mvt:assign name="l.item:quantity" value="l.item:quantity + l.settings:group:quantity" />
<mvt:assign name="l.item:subtotal" value="l.item:subtotal + l.settings:group:subtotal" />
<mvt:else>
<mvt:foreach iterator="order" array="admin_order:orders">
<mvt:foreach iterator="coupon" array="order:coupons">
<mvt:comment>
:code
:coupon_id
:order_id
:total (discount applied to order)
@steveosoule
steveosoule / example.xml
Created December 7, 2016 16:14 — forked from tessguefen/example.xml
Group Products Codes together into new array
<mvt:foreach iterator="group" array="basket:groups">
<mvt:comment> <!-- Build Dynamic Array --> </mvt:comment>
<mvt:if expr="miva_array_search( l.settings:new_array, 0, l.item, 'l.item:code EQ l.settings:group:code' )">
<mvt:assign name="l.item:quantity" value="l.item:quantity + l.settings:group:quantity" />
<mvt:else>
<mvt:assign name="l.success" value="miva_array_insert( l.settings:new_array, l.settings:group, -1 )" />
</mvt:if>
<mvt:comment> <!-- Build Dynamic Array --> </mvt:comment>
</mvt:foreach>
@steveosoule
steveosoule / README.md
Last active October 5, 2016 18:50 — forked from bheyde/gist:26d12958c5c013dd99165a6bc182a79a
Dynamic Resize Images Based on URL
@steveosoule
steveosoule / .gitignore
Created August 8, 2016 15:22 — forked from SaltwaterC/.gitignore
php cache curl
/cache/