Skip to content

Instantly share code, notes, and snippets.

View thednp's full-sized avatar
🚲
No longer working from home

thednp

🚲
No longer working from home
View GitHub Profile
@thednp
thednp / quadratic-bezier.js
Created September 12, 2020 19:24 — forked from tunght13488/quadratic-bezier.js
quadratic bezier curve length in javascript
/*
* http://en.wikipedia.org/wiki/B%C3%A9zier_curve
* http://www.malczak.linuxpl.com/blog/quadratic-bezier-curve-length/g
*/
function Point(x, y) {
this.x = x;
this.y = y;
}
@thednp
thednp / flatten.js
Created August 17, 2020 09:10 — forked from timo22345/flatten.js
Flatten.js, general SVG flattener. Flattens transformations of SVG shapes and paths. All shapes and path commands are supported.
<!doctype html>
<html>
<title>Flatten.js, General SVG Flattener</title>
<head>
<script>
/*
Random path and shape generator, flattener test base: https://jsfiddle.net/fjm9423q/embedded/result/
Basic usage example: https://jsfiddle.net/nrjvmqur/embedded/result/
@thednp
thednp / morf.js
Created February 6, 2020 15:26 — forked from joelambert/morf.js
Morf v0.1.5 Pre Release
/**
* @preserve Morf v0.1.5 (pre-release)
* http://www.joelambert.co.uk/morf
*
* Copyright 2011, Joe Lambert.
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
var Morf = function(elem, css, opts) {
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
@thednp
thednp / namespace.php
Created May 12, 2019 11:25 — forked from dongilbert/namespace.php
Joomla Namespace Compatibility Layer
<?php
return array(
'JAccess' => 'Joomla\\Access\\Access',
'JAccessRule' => 'Joomla\\Access\\Rule',
'JAccessRules' => 'Joomla\\Access\\Rules',
'JApplicationBase' => 'Joomla\\Application\\Base',
'JApplicationCli' => 'Joomla\\Application\\Cli',
'JApplicationDaemon' => 'Joomla\\Application\\Daemon',
'JRoute' => 'Joomla\\Application\\Route',
@thednp
thednp / swipe.js
Created September 13, 2016 19:50 — forked from SleepWalker/swipe.js
A simple swipe detection on vanilla js
var touchstartX = 0;
var touchstartY = 0;
var touchendX = 0;
var touchendY = 0;
var gesuredZone = document.getElementById('gesuredZone');
gesuredZone.addEventListener('touchstart', function(event) {
touchstartX = event.screenX;
touchstartY = event.screenY;
@thednp
thednp / timezones.txt
Created September 6, 2016 16:28 — forked from andredublin/timezones.txt
list of gmt timezones in different languages
/*
|--------------------------------------------------------------------------
| GMT Timezones
|--------------------------------------------------------------------------
|
| List GMT Timezones
*/
************ PHP ************
$timezones = array(
/*
* Ticker by Grant Skinner. Dec 5, 2010
* Visit http://easeljs.com/ for documentation, updates and examples.
*
*
* Copyright (c) 2010 Grant Skinner
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
@thednp
thednp / misc.js
Last active September 24, 2015 15:32 — forked from bennadel/index.htm
Removing Inline Opacity Filters After Fade-In / Fade-Out Transitions In IE8
// el.style.filter = ''; isn't working, this is the solution
el.style.removeAttribute( "filter" );
// when plain js is used, the above isn't working so you can try
el.style.setAttribute( "filter",'' );
@thednp
thednp / DragTransform
Last active August 29, 2015 14:23 — forked from fta2012/DragTransform
var selector = 'img' // Replace this with the selector for the element you want to make transformable
jQuery.getScript('//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', function() {
jQuery.getScript('//cdnjs.cloudflare.com/ajax/libs/numeric/1.2.6/numeric.min.js', function() {
(function() {
var $, applyTransform, getTransform, makeTransformable;
$ = jQuery;