Skip to content

Instantly share code, notes, and snippets.

View ericstumper's full-sized avatar

Eric ericstumper

View GitHub Profile
const sanityClient = require('@sanity/client');
const crypto = require('crypto');
const {
SANITY_API_TOKEN,
SANITY_PROJECT_ID,
SANITY_DATASET,
SHOPIFY_SECRET
} = process.env;

Note

Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.

Updates

  • [UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs
  • [UPDATE 3] For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached
  • [UPDATE 2] The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead
  • [UPDATE 1] Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.
@jevakallio
jevakallio / reactiveconf-slam-poetry.md
Last active July 7, 2021 19:57
#ReactiveConf 2017 Lightning Talk Submission: JavaScript Slam Poetry

TL;DR: If you want to see me perform a spoken word poem about JavaScript in front of 1000 people (and on video), please ⭐ star this gist. If you're on mobile, you'll need to request desktop site.

JavaScript Slam Poetry

Javascript! Slam! Poetry!

@dennisschaaf
dennisschaaf / A tool for Renaming fonts to solve Multiple font-face rules issue with wkhtmltopdf.md
Last active August 17, 2021 22:42
Renaming fonts to solve Multiple @font-face rules issue with wkhtmltopdf

The Problem

wkhtmltopdf is broken and cannot render multiple fonts because of some issues around names. See wkhtmltopdf/wkhtmltopdf#2435

Workaround

  1. Pick an 8 or less char name for each font and variation e.g. HelvBold, HelvLite, TimeReg
  2. Every variation needs to be a separate font file, with all the details renamed in Font Forge using the short name determined before.
  3. Give the font files the same short name (e.g. HelvBold.ttf)
@Riveascore
Riveascore / gmail_display_none_workaround.html
Last active April 19, 2017 04:46
Currently trying to use inlined "display: none;" doesn't work for Gmail, so here's the best workaround (of about 3 different approaches I tried).
<!--
You can't do position absolute + visibility/opacity in gmail
display: none; only works if you inline it as !important, but then this destroys the functionality for
all other clients, this workaround has been working wonders for us!!!
-->
<style>
div.gmail {
display: block;
width: 0;
overflow: hidden;