Skip to content

Instantly share code, notes, and snippets.

View 404ryannotfound's full-sized avatar

404ryannotfound 404ryannotfound

View GitHub Profile
@404ryannotfound
404ryannotfound / Shopify - main-order.liquid pass access
Created March 15, 2024 02:21
Shopify - Display a link to a pass or permit if it's still valid, allow customer to update pass details. (URL removed for security)
<!-- Start Passes -->
{% comment %}
Start Park Pass link generation - Check if the pass is within 1 year, wasn't cancelled, and if is a pass.
{% endcomment %}
{% if line_item.product.type == "Pass" and order.cancelled_at == blank %}
{% assign seconds_in_day = 86400 %}
{% assign seconds_in_weekend = 172800 %}
{% assign seconds_in_5days = 432000 %}
@404ryannotfound
404ryannotfound / main-account.liquid - Display PDF ICon
Created March 15, 2024 01:24
Shopify - Display a pdf icon on the orders of the main account page
{%- assign show_pdf_icon = false -%}
{%- for line_item in order.line_items -%}
{%- if line_item.product.type == "Pass" or line_item.product.type == "Firewood" or line_item.product.type == "Permit" -%}
{%- assign show_pdf_icon = true -%}
{%- break -%}
{%- endif -%}
{%- endfor -%}
{%- if show_pdf_icon -%}
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512">
@404ryannotfound
404ryannotfound / park-alerts.html
Created February 10, 2022 00:47
This script displays an alert (if present) for PWS parks, and will allow viewers to view on the Alerts system.
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Park Alert</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<link href="https://fonts.googleapis.com/css?family=Heebo" rel="stylesheet">
<link rel="shortcut icon" href="favicon.ico" type="image/vnd.microsoft.icon" />
<style>
html,body{margin:0;padding:0;overflow:hidden}body{margin:0;padding:0;font-family:'Heebo','Helvetica Neue',Arial,Helvetica,sans-serif;position:relative}.qrcode{float:right;width:150px;height:150px;position:absolute;top:0;right:0}.qrcode>img{width:130px;height:130px;float:right;margin:0;border:10px solid #fff;display:block}body{overflow:hidden}section{min-height:150px;background-color:#fff;margin:20px;-webkit-box-shadow:10px 10px 28px 1px rgba(0,0,0,.2);-moz-box-shadow:10px 10px 28px 1px rgba(0,0,0,.2);box-shadow:10px 10px 28px 1px rgba(0,0,0,.2);position:relative}section .fa-times{position:absolute;right:7px;top:7px;font-size:1.3em;cursor:pointer}section .icon{padding:43px;margin-right:
@404ryannotfound
404ryannotfound / Simple-HTML5-Local-Storage.js
Created April 2, 2020 13:12 — forked from jakebresnehan/Simple-HTML5-Local-Storage.js
Simple HTML5 Local Storage example to hide a element
Need to include Modernizer (http://www.modernizr.com/) and jQuery (http://jquery.com/)
$(document).ready(function($){
if (Modernizr.localstorage) {
$('#hide-button').click(function(e){
localStorage.setItem('subscribed',true);
$('#sign-up-form,#hide-button').hide();
$('#hide-button').hide();

Contributing

Issues

Issues are very valuable to this project.

  • Ideas are a valuable source of contributions others can make
  • Problems show where this project is lacking
  • With a question you show where contributors can improve the user experience
@404ryannotfound
404ryannotfound / MoveCamera.cs
Created June 28, 2017 02:47 — forked from JISyed/MoveCamera.cs
Camera movement script in Unity3D. Supports rotating, panning, and zooming. Attach to the main camera. Tutorial explaining code: http://jibransyed.wordpress.com/2013/02/22/rotating-panning-and-zooming-a-camera-in-unity/
// Credit to damien_oconnell from http://forum.unity3d.com/threads/39513-Click-drag-camera-movement
// for using the mouse displacement for calculating the amount of camera movement and panning code.
using UnityEngine;
using System.Collections;
public class MoveCamera : MonoBehaviour
{
//
// VARIABLES
@404ryannotfound
404ryannotfound / VrModeSwitch.cs
Created June 27, 2017 12:49 — forked from kormyen/VrModeSwitch.cs
Unity3D script for switching between Cardboard VR mode and "magic window" (non-vr-36-mode). For reference GyroCamera.cs see https://gist.github.com/kormyen/a1e3c144a30fc26393f14f09989f03e1 . For referenced VREyeRaycaster.cs see Unity VR samples https://www.assetstore.unity3d.com/en/#!/content/51519
using System.Collections;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.VR;
using VRStandardAssets.Utils;
public class VrModeSwitch : MonoBehaviour
{
// REFERENCE
[SerializeField] private GyroCamera _gyroControl;
@404ryannotfound
404ryannotfound / FPSScript.cs
Created May 30, 2017 00:28
Unity3d - Simple Frames Per Second script
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
namespace FBCapture
{
public class FPSScript : MonoBehaviour
{
/// <summary>
/// Delta time
Shader “Custom/CurvedWorld” {
Properties {
// Diffuse texture
_MainTex (“Base (RGB)”, 2D) = “white” {}
// Degree of curvature
_Curvature (“Curvature”, Float) = 0.001
// Axis Around which the curvature is required
_Axis (“Axis”, int ) = 2
}