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 |
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
| var keys = { | |
| name: 'name', | |
| email: 'email', | |
| password: 'password' | |
| } | |
| var obj = { | |
| [`_${keys.name}`]: 'John Doe', | |
| [`_${keys.email}`]: '[email protected]', |
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> | |
| </template> | |
| export default { | |
| name: 'sass loading component', | |
| } | |
| </script> | |
| <style lang="scss" scoped> | |
| // we can write sass now, woohoo! |
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
| module.exports = { | |
| module: { | |
| rules: [ | |
| // ... other rules omitted | |
| // this will apply to both plain `.scss` files | |
| // AND `<style lang="scss">` blocks in `.vue` files | |
| { | |
| test: /\.scss$/, | |
| use: [ |