Skip to content

Instantly share code, notes, and snippets.

Adrian Jones adrianbj

Block or report user

Report or block adrianbj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Fixed tinycon
/*!
* 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 Jan 16, 2015
PW module for hiding pages that don't match the user's name, under a certain parent page - currently hard coded parent name: visitenkarte
View HideOtherUserPages
<?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 Jun 18, 2018
Module to hide pages that are not editable by the logged in user.
View HideUneditablePages
<?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
*
View unicode2html.php
<?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 Aug 29, 2015
Automatically creates pages for all images uploaded to an album page.
View AutoImagePages.module
<?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 Oct 29, 2018
Processwire module for changing the default Image Select parent when inserting an image into an RTE
View ChangeImageSelectParent .module
<?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 Aug 25, 2014
Topo JSON of Chesapeake Bay reporting regions
View chesapeakebay_reporting_regions.topo.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.