Skip to content

Instantly share code, notes, and snippets.

Avatar
🙈
Breaking builds

Matthew Morek matthewmorek

🙈
Breaking builds
View GitHub Profile
View machine.js
/* eslint-disable no-unused-vars*/
function amountIsNotZero(context, event) {
return context.selectedAmount > 0;
}
// actions
const updateCountry = assign({
selectedCountry: (context, event) => event.selectedCountry,
});
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View magnet
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 / StoryblokPicture.vue
Last active Jun 9, 2020
Vue Storyblok Picture Component
View StoryblokPicture.vue
<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" />
@matthewmorek
matthewmorek / build-deploy.sh
Created Apr 18, 2020
Build and deploy with Parcel to Netlify with preview URLs
View build-deploy.sh
#!/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 / App.vue
Last active Aug 6, 2019
PWA Service Worker
View App.vue
<template>
<div id="app">
<h1>My app</h1>
</div>
</template>
<script>
export default {
name: 'My app',
mounted() {
@matthewmorek
matthewmorek / polyfils.js
Last active Mar 6, 2018
Handy JavaScript polyfils
View polyfils.js
/**
* 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";
View keybase.md

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 / sync.sh
Created Oct 24, 2015
CS-Cart 4.3.x Sync Script
View sync.sh
#!/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'