A Pen by Joe Lanman on CodePen.
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
| {% set values = [ | |
| "apples", | |
| "oranges", | |
| "pears", | |
| "bananas" | |
| ] %} | |
| <select name="fruit" class="govuk-select"> | |
| {% for value in values %} | |
| <option value="{{ value }}" {% if data["fruit"] == value %} selected {% endif %}> |
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
| router.get("/letters-contact-preference-audio", function(request, response){ | |
| let preferences = request.session.data['lettersContactPreference'] | |
| if (preferences.length && preferences.includes('audio'){ | |
| response.render("letters-contact-preference-audio") | |
| } else { | |
| response.redirect("/letters-contact-preference-braille") | |
| } | |
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() | |
| // Add your routes here - above the module.exports line | |
| router.get('/example', function(request, response){ | |
| var addresses = [] | |
| for (var i = 2; i<60; i+=2){ |
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
| Application Basics | |
| ------------------ | |
| Name: Firefox | |
| Version: 76.0.1 | |
| Build ID: 20200507114007 | |
| Update Channel: release | |
| User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:76.0) Gecko/20100101 Firefox/76.0 | |
| OS: Darwin 18.7.0 | |
| Multiprocess Windows: 1/1 Enabled by default |
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
| router.get('/section-1*', function(req, res, next){ | |
| res.locals['serviceName'] = foo | |
| next() | |
| }) |
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
| _asyncToGenerator(function* () { | |
| const executablePath = (isLambda) ? __dirname + '/headless-chromium' : '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'; | |
| console.log('executablePath: ' + executablePath); | |
| const browser = yield puppeteer.launch({ | |
| args: ['--no-sandbox', | |
| '--disable-setuid-sandbox', | |
| '--single-process', | |
| '--homedir=/tmp', | |
| '--data-path=/tmp/data-path', |
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 browser = await puppeteer.launch({ | |
| args: ['--no-sandbox', | |
| '--disable-setuid-sandbox', | |
| '--single-process', | |
| '--homedir=/tmp', | |
| '--data-path=/tmp/data-path', | |
| '--disk-cache-dir=/tmp/cache-dir'], | |
| executablePath: executablePath | |
| }); | |
| const inputHTML = 'file://' + __dirname + '/input.html' |
You can't. From looking at ImageMagick's configure script it does not appear to
look for any svg/rsvg delegate folder in order to make a static version.
I'm publishing this to try and make a Google result so other people don't wase their time trying :)
An alternative is to use rsvg-convert directly to convert from SVG to PNG.
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 marked = require('marked') | |
| // Route index page | |
| router.get('/', function (req, res) { | |
| res.render('index') | |
| }) | |
| // Add your routes here - above the module.exports line |
NewerOlder