Skip to content

Instantly share code, notes, and snippets.

View PerryRylance's full-sized avatar

Perry Rylance PerryRylance

View GitHub Profile
@PerryRylance
PerryRylance / download.php
Created September 13, 2024 07:08
Download Slack emojis
<?php
if($argc < 2)
{
echo PHP_EOL . "\033[44m Instructions \033[0m" . PHP_EOL;
?>
1. Head to https://your-workspace.slack.com/customize/emoji
2. Open developer tools network parse_ini_file
3. Find <?php echo "\033[34m"; ?>emojiAdmin.list<?php echo "\033[0m"; ?>, save in this directory
@PerryRylance
PerryRylance / interpolated-polar-coordinates-shader.frag
Created November 15, 2021 07:26
Post-processing for polar coordinates / planet effect
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
// Normalized pixel coordinates (from 0 to 1)
vec2 uv = fragCoord/iResolution.xy;
vec2 originalUv = uv;
uv -= 0.5;
vec2 n = normalize(uv);
jQuery(function($){
$(document.body).on("init.wpgmza", function(event) {
var map = event.map;
var button = $("<button type='button'>Toggle KML</button>");
button.on("click", function(event) {
map.kmlLayers.forEach(function(layer) {
jQuery(function($) {
var Parent;
WPGMZA.CustomOLMap = function(element, options)
{
var self = this;
WPGMZA.ProMap.apply(this, arguments);
jQuery(function($) {
if(WPGMZA.isTouchDevice())
{
$(window).on("init.wpgmza", function(event) {
var map = event.target;
// On touch devices, require two fingers to drag and pan
// NB: Temporarily removed due to inconsistent behaviour
@PerryRylance
PerryRylance / no-shortcode-infowindow.js
Last active September 23, 2019 08:26
WP Google Maps - Pro add-on - Prevent infowindow opening when marker shortcode attribute used
jQuery(function ($) {
$(window).on("init.wpgmza", function(event) {
WPGMZA.ProMarker.prototype.onAdded = function (event) {
var m;
WPGMZA.Marker.prototype.onAdded.call(this, event);
this.updateIcon();
@PerryRylance
PerryRylance / wpgm-polyline-toggles.js
Created March 28, 2019 12:59
Polyline toggle checkboxes for WP Google Maps
jQuery(function($) {
$(window).on("load", function(event) {
var $ = jQuery;
var map_id = 2;
function bindClickListener(checkbox)
{
$(checkbox).on("change input", function() {