This file contains hidden or 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
#!/bin/bash | |
# Set the WordPress root to the current working directory. | |
WORDPRESS_ROOT="$PWD" | |
# Check if the current directory looks like a WordPress installation by checking for wp-config.php | |
if [ ! -f "$WORDPRESS_ROOT/wp-config.php" ]; then | |
echo "Error: wp-config.php not found in the current directory." | |
echo "Please 'cd' into your WordPress root directory before running this script." | |
exit 1 |
This file contains hidden or 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: Deploy to Firebase Hosting on PR | |
on: pull_request | |
permissions: | |
checks: write | |
contents: read | |
pull-requests: write | |
jobs: | |
build_and_preview: | |
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} | |
runs-on: ubuntu-latest |
This file contains hidden or 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
<div style="page-break-inside:avoid;page-break-after:always"></div> |
This file contains hidden or 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
{ | |
"globals" : | |
{ | |
"alwaysShowTabs" : true, | |
"initialCols" : 120, | |
"initialRows" : 30, | |
"keybindings" : | |
[ | |
{ | |
"command" : "closeTab", |
This file contains hidden or 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
console.log\((.+)\);\n # this will match most console.log(); statements, unless they contain brackets or operators |
This file contains hidden or 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
$base64_img = $_POST['img']; | |
$split = explode(',', substr($base64_img, 5), 2); | |
$mime = $split[0]; | |
$img_data = $split[1]; | |
$mime_split_without_base64 = explode(';', $mime, 2); | |
$mime_split = explode('/', $mime_split_without_base64[0], 2); | |
if (count($mime_split) == 2) { | |
// get file extension | |
$extension = $mime_split[1]; |
This file contains hidden or 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
const express = require('express'); | |
const router = express.Router(); | |
const exportCharts = require('./modules/export-charts.js'); // this is my export module | |
router.post('/mbd', async function(req,res){ | |
exportCharts.initPool(); | |
const chartOptions = req.body; | |
This file contains hidden or 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
const exporter = require('highcharts-export-server'); | |
exports.module = function(exportSettings){ | |
return new Promise((resolve, reject) => { | |
exporter.initPool() | |
exporter.export(exportSettings, function(err, res){ | |
if(err){ | |
console.log(err) | |
return reject(err) |
This file contains hidden or 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
const exporter = require('highcharts-export-server'); | |
const chartExport = { | |
initPool: function (){ | |
exporter.initPool({ // experiment with different values here to optimize performance | |
maxWorkers: 10, | |
initialWorkers: 1, | |
workLimit: 25, | |
timeoutThreshold: 2000, | |
queueSize: 3, |
This file contains hidden or 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
<template> | |
<div> | |
<div v-if="!authenticating"> | |
<v-layout | |
align-center | |
justify-center | |
> | |
<v-flex | |
xs12 | |
sm8 |
NewerOlder