Skip to content

Instantly share code, notes, and snippets.

@anthonator
anthonator / example.html
Last active November 8, 2022 19:17
Malomo.js Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
</head>
<body>
<div id="tracking-block"></div>
<script src="https://js.gomalomo.com/v2/" type="application/javascript"></script>
@anthonator
anthonator / malomo-banner-sosv1.liquid
Last active April 14, 2023 18:40
Malomo banner for Shopify OS 1.0
{%- style -%}
{% assign header_font = section.settings.header_font %}
{{ header_font | font_face }}
{% assign header_font_bold = header_font | font_modify: 'weight', 'bolder' %}
{% assign header_font_italic = header_font | font_modify: 'style', 'italic' %}
{% assign header_font_bold_and_italic = header_font_bold | font_modify: 'style', 'italic' %}
{{ header_font_bold | font_face }}
{%- style -%}
{% assign header_font = section.settings.header_font %}
{{ header_font | font_face }}
{% assign header_font_bold = header_font | font_modify: 'weight', 'bolder' %}
{% assign header_font_italic = header_font | font_modify: 'style', 'italic' %}
{% assign header_font_bold_and_italic = header_font_bold | font_modify: 'style', 'italic' %}
{{ header_font_bold | font_face }}
@anthonator
anthonator / client.js
Created November 11, 2014 15:41
Superagent wrapper with base URL support
var request = require("superagent");
/**
* Superagent wrapper for easily making AJAX requests. Provides a layer of
* convenience by adding a base URL to each request. The base URL is derived
* from the ```API_URL``` environment variable.
*/
module.exports = {
/**
* DELETE relative `path` with optional callback `fn(res)`.
@anthonator
anthonator / s3-user-policy
Created July 29, 2014 15:03
S3 limited user policy
{
"Statement": [
{
"Sid": "Stmt1361481566727",
"Action": [
"s3:AbortMultipartUpload",
"s3:DeleteObject",
"s3:DeleteObjectVersion",
"s3:GetBucketAcl",
"s3:GetBucketLocation",
@anthonator
anthonator / .emacs
Last active September 30, 2015 23:38
Emacs config for Rails dev
(push "/usr/local/git/bin" exec-path)
(setq make-backup-files nil)
(setq auto-save-default nil)
(setq-default tab-width 2)
(setq-default indent-tabs-mode nil)
(setq inhibit-startup-message t)
(setq linum-format "%d ")
(fset 'yes-or-no-p 'y-or-n-p)