Skip to content

Instantly share code, notes, and snippets.

View mrandyclark's full-sized avatar

Andrew Clark mrandyclark

View GitHub Profile
analytics.subscribe("checkout_completed", (event) => {
var script = document.createElement('script');
script.onload = function() {
const cacheBust = Math.random() * 10000000000000;
const total = event.data.checkout.totalPrice.amount;
const email = event.data.checkout.email;
const orderId = event.data.checkout.order.id;
const protocol = "https:" === document.location.protocol ? "https://" : "http://";
<Script id="tatari-sitewide" strategy="afterInteractive">
{`
!function(){try{!function(t,i){if(!i.version){window.tatari=i,i.init=function(t,n){var e=function(t,n){i[n]=function(){t.push([n].concat(Array.prototype.slice.call(arguments,0)))}};"track pageview identify".split(" ").forEach(function(t){e(i,t)}),i._i=t,i.config=n,i.pageview()},i.version="1.2.1";var n=t.createElement("script");n.type="text/javascript",n.async=!0,n.src="https://d2hrivdxn8ekm8.cloudfront.net/tag-manager/fbe854b3-27fd-453c-8c93-5e2e2dfe7ce3-latest.js";var e=t.getElementsByTagName("script")[0];e.parentNode.insertBefore(n,e)}}(document,window.tatari||[])}catch(t){console.log(t)}}(); tatari.init('fbe854b3-27fd-453c-8c93-5e2e2dfe7ce3');
`}
</Script>
@mrandyclark
mrandyclark / index.html
Created January 2, 2018 04:43
powerzone generator web version
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous">
javascript:(function()%7Bfunction%20callback()%7B(function(%24)%7Bvar%20jQuery%3D%24%3Bfunction%20getSafeName(name)%20%7Breturn%20name.replace(%2F%5B%5EA-Z0-9%5D%2B%2Fig%2C%20'').toLowerCase()%3B%7Dvar%20data%20%3D%20%5B%5D%3B%24(%22.player-name%22).each(function()%20%7Bvar%20name%20%3D%20%24(this).text().trim()%3Bdata.push(%7Bname%3A%20name%2CsafeName%3A%20getSafeName(name)%7D)%3B%7D)%3Bvar%20fileName%20%3D%20%22field.json%22%3Bvar%20encodedData%20%3D%20encodeURIComponent(JSON.stringify(data))%3Bvar%20downloadData%20%3D%20%22text%2Fjson%3Bcharset%3Dutf-8%2C%22%20%2B%20encodedData%3Bvar%20link%20%3D%20document.createElement(%22a%22)%3Blink.setAttribute(%22href%22%2C%20(%22data%3A%22%20%2B%20downloadData)%20)%3Blink.setAttribute(%22download%22%2C%20fileName)%3Blink.click()%7D)(jQuery.noConflict(true))%7Dvar%20s%3Ddocument.createElement(%22script%22)%3Bs.src%3D%22https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F1.7.1%2Fjquery.min.js%22%3Bif(s.addEventListener)%7Bs.addEventListener(%22load%22%2Ccallbac
<?php
$action = $_GET['action'];
API::process_action($action);
?>
<?php
class API {
<script>
// this is a function that you're going to pass a messageCode to.
// the message code will be an integer and you'll return a string
// that is the error message.
function getErrorMessage(messageCode)
{
var errorMessage = "";
<script>
// this is a function that you're going to pass a messageCode to.
// the message code will be an integer and you'll return a string
// that is the error message.
function getErrorMessage(messageCode)
{
var errorMessage = "";
// start the switch statement
<form id="new_size">
<input type="text" name="size_name" id="size_input" />
<input type="submit" />
</form>
<script>
$(document).ready(function() {
$("#new_size").submit(function(evt) {
<script>
function WriteToTheConsole(information) {
console.log(information);
}
$(document).ready(function() {
WriteToTheConsole("hey jackass");
});
controller :sites do
match '/:action'
end