Skip to content

Instantly share code, notes, and snippets.

@liamr
liamr / index.html
Created September 1, 2020 13:53 — forked from Ehesp/index.html
Firebase Web SDK Scratch Pad
<!doctype html>
<html lang="en">
<body>
<script src="https://www.gstatic.com/firebasejs/6.0.4/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/6.0.4/firebase-database.js"></script>
<script>
// TODO: Replace the following with your app's Firebase project configuration
var firebaseConfig = {
@liamr
liamr / autovst.py
Last active July 2, 2021 10:16
.aupreset to .fxp.
/*
From: https://forum.juce.com/t/script-to-convert-aupreset-to-fxp/7919
Author: https://forum.juce.com/u/yairadix
I made a small Python script to convert .aupreset files to .fxp format (VST presets).
Hopefully others may find it useful too.
Our use case for it was creating our factory presets for SurferEQ once in Logic and then converting them to other formats.
This script could be easily adapted to convert the other way around. (it uses the Construct library to describe the fxb format declaratively for both parsing and building)
*/
@liamr
liamr / S3-Static-Sites.md
Created May 16, 2018 18:38 — forked from bradwestfall/S3-Static-Sites.md
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation

Resources

@liamr
liamr / gist:9104020
Created February 19, 2014 23:48
Open external links in a new window
$("a[rel=external], a[href^='http:']:not([href*='" + window.location.host + "']), a[href^='https:']:not([href*='" + window.location.host + "'])").each(function(){
$(this).attr("target", "_blank");
});
@liamr
liamr / is_touch.js
Created June 13, 2013 12:35
Touch Event Helper
function is_touch_device() {
return !!('ontouchstart' in window) // works on most browsers
|| !!('onmsgesturechange' in window); // works on ie10 (apparently not)
};
@liamr
liamr / initslides.js
Created May 20, 2013 10:18
Flexslider behavior example
/**
* BEHAVIOR: SLIDES
*/
define(['jquery', 'libs/jquery.flexslider-min'], function($) {
InitSlides = {
container: null,
@liamr
liamr / app.js
Created May 20, 2013 10:13
App starting point, using the garber/irish execution + require.js. Also, a bunch of data-behavior code
/*
PROJECT
LiamR
Usage:
<body data-controller="users" data-action="show">
<div data-behavior="init_something">
@liamr
liamr / vendor_mixin.scss
Created May 20, 2013 10:02
Nice little vendor prefix mixin for scss
@mixin vendor($property, $value...){
-webkit-#{$property}:$value;
-moz-#{$property}:$value;
-ms-#{$property}:$value;
-o-#{$property}:$value;
#{$property}:$value;
}
@liamr
liamr / cm_signup.php
Created May 13, 2013 09:21
Campaign Monitor CURL
<?php
public function signup_cm($email, $name){
$code = 'xxxx-xxxx';
// The POST URL and parameters
$request = 'http://xxxx.createsend.com/t/j/s/xxxx/?callback=my_callback';
$postargs = '';
$postargs .= 'cm-name=' . $name . '&cm-' . $code . '=' . $email;
// Get the curl session object
@liamr
liamr / StarterMain
Created April 22, 2013 10:48
StarterBase - main styles
/*------------------------------------------------------------
Start Main
Created by: Liam R
Contact: hello-at-liamr.com
Copyright 2013
--------------------------------------------------------------*/