Skip to content

Instantly share code, notes, and snippets.

View zurie's full-sized avatar
💭
I may be slow to respond.

Zurie zurie

💭
I may be slow to respond.
View GitHub Profile
@zurie
zurie / vue-scrollwizardry.js
Created November 19, 2017 17:05 — forked from homerjam/vue-scrollwizardry.js
Vue plugin for scrollwizardy
/*
eslint no-underscore-dangle: 0, max-len: 0, prefer-destructuring: 0, no-nested-ternary: 0
*/
import TweenMax from 'gsap/TweenMax';
import TimelineMax from 'gsap/TimelineMax';
import * as ScrollWizardry from 'scrollwizardry';
// import * as ScrollWizardry from '../../scrollwizardry/src';
const { Controller, Scene } = ScrollWizardry;
export function imgResolver(resourceProvider: ResourceProvider) {
const preloadImgs: string[] = ['/assets/bg_color.jpg', '/assets/bg_bw.jpg'];
return new Promise(function (resolve) {
const preloadImage = (img: HTMLImageElement) => console.log(img.src + ' loaded!');
const preloadError = (err: Error) => console.log('Preload Error!' + err);
const preloadComplete = () => setTimeout(resolve, 0);
export function imgResolver(resourceProvider: ResourceProvider) {
const preloadImgs: string[] = ['/assets/bg_color.jpg', '/assets/bg_bw.jpg'];
return new Promise(function (resolve) {
const preloadImage = (img: HTMLImageElement) => console.log(img.src + ' loaded!');
const preloadError = (err: Error) => console.log('Preload Error!' + err);
const preloadComplete = () => setTimeout(resolve, 0);
// Type definitions for GreenSock Animation Platform 1.15.1
// Project: http://www.greensock.com/get-started-js/
// Definitions by: Robert S <https://github.com/codebelt>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// JavaScript Docs http://api.greensock.com/js/
// Version 1.15.1 (TypeScript 1.4)
interface IDispatcher {
addEventListener(type:string, callback:Function, scope?:Object, useParam?:boolean, priority?:number):void;
@zurie
zurie / linear-gradient.php
Created September 23, 2015 17:33
Dynamic Linear Gradient in PHP outputs in SVG
<?php
/**
* This function takes in a color string and test whether it is in hex format.
* If so it will simply return a '#' prefixed version to make it the standard
* hex format, or return it as-is.
*
* This is done to make linking to this file within css a bit easier, since we'd
* need to escape the '#' so the browser doesn't treat it as a hash and ignore
* it when requesting content. Otherwise users would have to link using:
*
@zurie
zurie / Test2.efi
Last active August 29, 2015 14:26 — forked from NickWoodhams/Test2.efi
Recompiled OsxLowMemFixDrv-64.efi Driver to Fix OsxAptioFixDriv Error
4d5a 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 8000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
5045 0000 6486 0400 0000 0000 0000 0000
0000 0000 f000 2e00 0b02 0000 e004 0000
[[!If?
&subject=`[[*mainImage]]`
&operator=`null`
&then=`<div>[[*content]]</div>`
&else=`<div>[[*blahblah]]</div>`
]]
[[!getResources? &parents=`23` &tpl=`homepage_slider` &includeContent=`1` &showUnpublished=`0` &showHidden=`1` &processTVs=`1` &includeTVs=`1` &tvPrefix=`` &sortdir=`ASC` &sortby=`[[!getResourcesTree? &parents=`23`]]` &limit=`0` &depth=`0`]]
[[Wayfinder? &startId=`0` &outerTpl=`menuContainer` &rowTpl=`menu_row` &innerTpl=`menu_inner` &cacheResults=`1` level=`3`]]
[[!getResources? &parents=`2` &tpl=`thumbnail` &includeContent=`1` &showUnpublished=`1` &showHidden=`1` &processTVs=`1` &includeTVs=`1` &tvPrefix=`` &sortdir=`ASC` &sortby=`[[!getResourcesTree? &parents=`2`]]` &limit=`0` &depth=`0`]]