Skip to content

Instantly share code, notes, and snippets.

View matthewmorek's full-sized avatar
🙈
Breaking builds

Matthew Morek matthewmorek

🙈
Breaking builds
View GitHub Profile
@matthewmorek
matthewmorek / sync.sh
Created October 24, 2015 12:55
CS-Cart 4.3.x Sync Script
#!/bin/sh
# ---
# This script assumes you're using SSH key-based authentication to your remote
# It should be run from the root of the local CS-Cart installation, i.e.: `$ ./bin/sync.sh`
# ---
red='\033[0;31m'
green='\033[0;32m'
normal='\033[0m'

Keybase proof

I hereby claim:

  • I am matthewmorek on github.
  • I am matthewmorek (https://keybase.io/matthewmorek) on keybase.
  • I have a public key ASDHS_N-MBkWAvG1pBDqCfcWGas5VmaEEcbdNJ9IWW7LzQo

To claim this, I am signing this object:

@matthewmorek
matthewmorek / polyfils.js
Last active March 6, 2018 12:50
Handy JavaScript polyfils
/**
* Barebones OS detection
* @return {OSName} string - contains OS alias
*/
var platform = function () {
'use strict';
var OSName="generic";
if (navigator.appVersion.indexOf("Win")!=-1) OSName="win";
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="mac";
@matthewmorek
matthewmorek / App.vue
Last active August 6, 2019 15:02
PWA Service Worker
<template>
<div id="app">
<h1>My app</h1>
</div>
</template>
<script>
export default {
name: 'My app',
mounted() {
@matthewmorek
matthewmorek / build-deploy.sh
Created April 18, 2020 13:19
Build and deploy with Parcel to Netlify with preview URLs
#!/bin/sh
set -e
echo "== BUILDING =="
if [ "$CONTEXT" = "production" ]; then
parcel build public/**/*.html --public-url ${URL} --no-source-maps
else
parcel build public/**/*.html --public-url ${DEPLOY_URL} --no-source-maps
fi
@matthewmorek
matthewmorek / StoryblokPicture.vue
Last active June 9, 2020 12:12
Vue Storyblok Picture Component
<template>
<picture>
<source
v-for="format in formats"
:srcset="srcset(url, sizes, format, quality)"
:alt="alt"
:key="format"
:type="`image/${format}`"
/>
<img :src="src(url, 960, 'jpg', 90)" :alt="alt" />
magnet:?xt=urn:btih:b738a7809db003bdd311f0a472311ad0d5b1e973&dn=Hell%20Or%20High%20Water%202016%201080p%20Bluray%2010bit%20DTS%20Omikron&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969%2Fannounce&tr=http%3A%2F%2F0d.kebhana.mx%3A443%2Fannounce&tr=http%3A%2F%2F5rt.tace.ru%3A60889%2Fannounce&tr=http%3A%2F%2F87.253.152.137%2Fannounce&tr=http%3A%2F%2F91.216.110.47%2Fannounce&tr=http%3A%2F%2F91.217.91.21%3A3218%2Fannounce&tr=http%3A%2F%2F91.218.230.81%3A6969%2Fannounce&tr=http%3A%2F%2F93.92.64.5%2Fannounce&tr=http%3A%2F%2Fatrack.pow7.com%2Fannounce&tr=http%3A%2F%2Fbt.henbt.com%3A2710%2Fannounce&tr=http%3A%2F%2Fbt.pusacg.org%3A8080%2Fannounce&tr=http%3A%2F%2Fbtracker.top%3A11451%2Fannounce&tr=http%3A%2F%2Fgwp2-v19.rinet.ru%3A80%2Fannounce&tr=http%3A%2F%2Fh4.trakx.nibba.trade%3A80%2Fannounce&tr=http%3A%2F%2Fopen.trackerlist.xyz%3A80%2Fannounce&tr=http%3A%2F%2Fretracker.joxnet.ru%3A80%2Fannounce&tr=http%3A%2F%2Fretracker.sevstar.net%3A2710%2Fannounce&tr=http
@matthewmorek
matthewmorek / machine.js
Created January 2, 2021 12:08
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@matthewmorek
matthewmorek / machine.js
Created January 5, 2021 21:57
Generated by XState Viz: https://xstate.js.org/viz
/* eslint-disable no-unused-vars*/
function amountIsNotZero(context, event) {
return context.selectedAmount > 0;
}
// actions
const updateCountry = assign({
selectedCountry: (context, event) => event.selectedCountry,
});