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 puppeteer = require('puppeteer'); | |
class Webpage { | |
static async generatePDF(url) { | |
const browser = await puppeteer.launch({ headless: true }); // Puppeteer can only generate pdf in headless mode. | |
const page = await browser.newPage(); | |
await page.goto(url, { waitUntil: 'networkidle', networkIdleTimeout: 5000 }); // Adjust network idle as required. | |
const pdfConfig = { | |
path: 'url.pdf', // Saves pdf to disk. | |
format: 'A4', |
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
#!/bin/bash | |
set -e | |
cmd="$@" | |
export REDIS_URL=redis://redis:6379 | |
# the official postgres image uses 'postgres' as default user if not set explictly. | |
if [ -z "$POSTGRES_USER" ]; then | |
export POSTGRES_USER=postgres | |
fi |
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
FROM node:latest | |
RUN npm install -g sails grunt npm-check-updates | |
COPY ./package.json /package.json | |
RUN npm install | |
RUN npm install --save sails-postgresql@beta | |
COPY ./compose/sails/entrypoint.sh /entrypoint.sh | |
RUN sed -i 's/\r//' /entrypoint.sh |
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
version: '2' | |
volumes: | |
postgres_data_dev: {} | |
postgres_backup_dev: {} | |
services: | |
postgres: | |
build: ./compose/postgres | |
volumes: |
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
/** | |
* Load favicons | |
* Place icons in the theme images directory. Want more? http://realfavicongenerator.net/ | |
*/ | |
function sage_favicons() { | |
echo '<link rel="apple-touch-icon" sizes="57x57" href="'. get_template_directory_uri() .'/dist/images/apple-touch-icon-57x57.png">';echo "\n"; | |
echo '<link rel="apple-touch-icon" sizes="60x60" href="'. get_template_directory_uri() .'/dist/images/apple-touch-icon-60x60.png">';echo "\n"; | |
echo '<link rel="apple-touch-icon" sizes="72x72" href="'. get_template_directory_uri() .'/dist/images/apple-touch-icon-72x72.png">';echo "\n"; | |
echo '<link rel="apple-touch-icon" sizes="76x76" href="'. get_template_directory_uri() .'/dist/images/apple-touch-icon-76x76.png">';echo "\n"; | |
echo '<link rel="apple-touch-icon" sizes="114x114" href="'. get_template_directory_uri() .'/dist/images/apple-touch-icon-114x114.png">';echo "\n"; |
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
{ | |
"rules": { | |
"at-rule-empty-line-before": "always"|"never", | |
"at-rule-name-case": "lower"|"upper", | |
"at-rule-no-vendor-prefix": true, | |
"at-rule-semicolon-newline-after": "always", | |
"block-closing-brace-newline-after": "always"|"always-single-line"|"never-single-line"|"always-multi-line"|"never-multi-line", | |
"block-closing-brace-newline-before": "always"|"always-multi-line"|"never-multi-line", | |
"block-closing-brace-space-after": "always"|"always-single-line"|"never-single-line"|"always-multi-line"|"never-multi-line", | |
"block-closing-brace-space-before": "always"|"never"|"always-single-line"|"never-single-line"|"always-multi-line"|"never-multi-line", |
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
{ | |
"payZen": { | |
"url": "https://secure.payzen.eu/vads-payment/", | |
"certificat": "XXXXXXXXX", | |
"vads_site_id": "YYYYYYYY", | |
"vads_version": "V2", | |
"vads_ctx_mode": "TEST" | |
} | |
} |
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
cd tmp | |
wget https://github.com/drush-ops/drush/archive/6.3.0.zip | |
unzip 6.3.0.zip | |
rm -rf 6.3.0.zip | |
mv drush-6.3.0 ~/var/php/admin/ | |
cd ~/var/php/admin/ | |
mv drush-6.3.0 drush | |
chmod 755 drush/drush | |
chmod 755 drush/drush.php | |
nano ~/etc/bash/bashrc |
title | author | layout | categories | |||
---|---|---|---|---|---|---|
Using grunt and angular with pushstate support |
Blackjid |
post |
|
NewerOlder