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
<div style="page-break-inside:avoid;page-break-after:always"></div> |
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
{ | |
"globals" : | |
{ | |
"alwaysShowTabs" : true, | |
"initialCols" : 120, | |
"initialRows" : 30, | |
"keybindings" : | |
[ | |
{ | |
"command" : "closeTab", |
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
console.log\((.+)\);\n # this will match most console.log(); statements, unless they contain brackets or operators |
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
$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 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 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 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 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 |
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
var keys = { | |
name: 'name', | |
email: 'email', | |
password: 'password' | |
} | |
var obj = { | |
[`_${keys.name}`]: 'John Doe', | |
[`_${keys.email}`]: '[email protected]', |
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
<template> | |
<div> | |
</div> | |
</template> | |
export default { | |
name: 'sass loading component', | |
} | |
</script> | |
<style lang="scss" scoped> | |
// we can write sass now, woohoo! |
NewerOlder