View groundwaterStyles.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Circle, Stroke, Style, Fill } from "ol/style"; | |
import Feature from "ol/Feature"; | |
import Point from "ol/geom/Point"; | |
const percentileOpacity = 0.3; | |
export const percentileConfigs = [ | |
{ | |
value: "p99", | |
color: "#083092", |
View class-pclzip.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// -------------------------------------------------------------------------------- | |
// PhpConcept Library - Zip Module 2.8.2 | |
// -------------------------------------------------------------------------------- | |
// License GNU/LGPL - Vincent Blavet - August 2009 | |
// http://www.phpconcept.net | |
// -------------------------------------------------------------------------------- | |
// | |
// Presentation : | |
// PclZip is a PHP library that manage ZIP archives. |
View package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "jwr-nuxt", | |
"version": "1.0.0", | |
"description": "My stylish Nuxt.js project", | |
"author": "Mattias Siø Fjellvang", | |
"private": true, | |
"scripts": { | |
"dev": "export NODE_TLS_REJECT_UNAUTHORIZED=0 && nuxt --env.NODE_TLS_REJECT_UNAUTHORIZED=0", | |
"build": "nuxt build", | |
"start": "nuxt start", |
View gist:cdb711d2f5634b79c2385f0977c0b7bf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12:50:09 PM: Build ready to start | |
12:50:12 PM: build-image version: 2dbd444fcdce00cf06325060a8238d5ae3e86774 | |
12:50:12 PM: build-image tag: v3.3.7 | |
12:50:12 PM: buildbot version: 11918e084194721d200458438c92ff8180b3b56c | |
12:50:12 PM: Fetching cached dependencies | |
12:50:12 PM: Failed to fetch cache, continuing with build | |
12:50:12 PM: Starting to prepare the repo for build | |
12:50:13 PM: No cached dependencies found. Cloning fresh repo | |
12:50:13 PM: git clone https://github.com/The-Jewellery-Room/jwr-nuxt | |
12:50:14 PM: Preparing Git Reference refs/heads/master |
View functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This allows you to get the archive page / shop page data through the WordPress REST APi. | |
* It's not beautiful, but it works. | |
* | |
* The REST URL: https://yourwebsite.com/wp-json/custom-woocommerce/v1/shop/slug | |
* | |
* Parameters: | |
* "filter_{attribute_name}=some_value", e.g. "/shop/?filter_color=red". You can filter multiple values: ?filter_color=red,blue&filter_size=1,2 | |
* "categories", e.g. "/shop/?categories=shoes,shirts&filter_color=blue" |
View install-wp-plugin.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Hide the 'Activate Plugin' and other links when not using QuietSkin as these links will | |
* fail when not called from /wp-admin | |
*/ | |
class QuietSkin extends \WP_Upgrader_Skin { | |
public function feedback($string, ...$args) { /* no output */ } |
View wp-cli.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Below script helps you migrate from "WooCommerce Multi Currency Premium" by VillaTheme to WPML's own multi-currency | |
* This is helpful if you've added WPML to your site, after setting up multi currency, and would like to lower | |
* your plugin overhead, or if you're experiecing issues with VillaTheme's plugin. | |
* | |
* Esentially, when you run below script, it will migrate all the postmeta from your products / variations from meta | |
* values "_DKK" to "_price_DKK", etc. | |
* | |
* NOTE: This script does not handle scheduled prices, but it can be easilly managed. Also sale price is not included, |
View gist:c30ca5b0aea87ec0df57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function base64_decode_apns_token($token) { | |
$a = unpack("H*hex", base64_decode($token)); | |
$b = str_split($a["hex"], 8); | |
$output = ""; | |
foreach ($b as $current) { | |
$output .= "$current"; | |
} | |
return trim($output); |