Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@adrianbj
adrianbj / css-vertical-carousel-animation.markdown
Created March 3, 2023 05:10
CSS vertical carousel animation
/*!
* Tinycon - A small library for manipulating the Favicon
* Tom Moor, http://tommoor.com
* Copyright (c) 2015 Tom Moor
* @license MIT Licensed
*/
!function(){var e,t={},n=null,o=null,i=null,r=null,a={},l=Math.ceil(window.devicePixelRatio)||1,c=16*l,u={width:7,height:9,font:10*l+"px arial",color:"#ffffff",background:"#F03D25",fallback:!0,crossOrigin:!0,abbreviate:!0},f=(e=navigator.userAgent.toLowerCase(),function(t){return-1!==e.indexOf(t)}),d=f("trident"),h=(f("chrome"),f("chrome")||f("safari")),g=f("safari")&&!f("chrome"),m=f("mozilla")&&!f("chrome")&&!f("safari"),s=function(){if(!o||!n){var e=function(){for(var e=document.getElementsByTagName("link"),t=0,n=e.length;t<n;t++)if((e[t].getAttribute("rel")||"").match(/\bicon\b/i))return e[t];return!1}();n=e?e.getAttribute("href"):"/favicon.ico",o||(o=n)}return n},b=function(){return r||((r=document.createElement("canvas")).width=c,r.height=c),r},v=function(e){if(e){!function(){for(var e=document.getElementsByTagName("link"),t=0,n=e.length;t<n;t++)void
@adrianbj
adrianbj / HideOtherUserPages
Created January 16, 2015 18:41
PW module for hiding pages that don't match the user's name, under a certain parent page - currently hard coded parent name: visitenkarte
<?php
/**
*
*
* ProcessWire 2.x
* Copyright (C) 2010 by Ryan Cramer
* Licensed under GNU/GPL v2, see LICENSE.TXT
*
* http://www.processwire.com
@adrianbj
adrianbj / HideUneditablePages
Last active June 18, 2018 13:27
Module to hide pages that are not editable by the logged in user.
<?php
/**
*
* Module to hide pages that are not editable by the logged in user.
*
* ProcessWire 2.x
* Copyright (C) 2010 by Ryan Cramer
* Licensed under GNU/GPL v2, see LICENSE.TXT
*
<?php
// Works Perfict
function uni2html($string){
//preg_replace(): Compilation failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1.
//so can't use $string = preg_replace('/\\u([0-9A-Za-z]+)/', '&#x$1;', $string); directly.
$string = explode('\\', $string);
$string = implode('%', $string);
$string = preg_replace('/%u([0-9A-Za-z]+)/', '&#x$1;', $string);
return html_entity_decode($string, ENT_COMPAT, 'UTF-8');
@adrianbj
adrianbj / AutoImagePages.module
Last active January 6, 2021 02:28
Automatically creates pages for all images uploaded to an album page.
<?php
class AutoImagePages extends WireData implements Module, ConfigurableModule {
/**
* Data as used by the get/set functions
*
*/
protected $data = array();
@adrianbj
adrianbj / ChangeImageSelectParent .module
Last active October 29, 2018 14:30
Processwire module for changing the default Image Select parent when inserting an image into an RTE
<?php
class ChangeImageSelectParent extends WireData implements Module, ConfigurableModule {
/**
* Data as used by the get/set functions
*
*/
protected $data = array();
@adrianbj
adrianbj / chesapeakebay_reporting_regions.topo.json
Created August 25, 2014 18:56
Topo JSON of Chesapeake Bay reporting regions
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.