Update Workspace slides for PHPNW
This commit is contained in:
parent
398fa3c547
commit
fdd5b3138f
16 changed files with 331 additions and 26 deletions
3
working-with-workspace/code/arguments.txt
Normal file
3
working-with-workspace/code/arguments.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
command('say-hello <name>'): |
|
||||
#!bash|=
|
||||
echo ={ @('message') } from ={ input.argument('name') }
|
5
working-with-workspace/code/attributes.txt
Normal file
5
working-with-workspace/code/attributes.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
attribute('message'): Hello World!
|
||||
|
||||
command('say-hello'): |
|
||||
#!bash|@
|
||||
echo @('message')
|
11
working-with-workspace/code/confd.txt
Normal file
11
working-with-workspace/code/confd.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
attributes:
|
||||
drupal:
|
||||
docroot: web
|
||||
|
||||
command('apply config'): |
|
||||
#!php
|
||||
$ws->confd('workspace:/confd')->apply();
|
||||
|
||||
confd('workspace:/confd'):
|
||||
- src: 'vhost.conf'
|
||||
dst: 'workspace:/.my127ws/docker/nginx/default.conf'
|
7
working-with-workspace/code/environment-variables.txt
Normal file
7
working-with-workspace/code/environment-variables.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
command('say-hello <name>'):
|
||||
env:
|
||||
MESSAGE: = @('message')
|
||||
NAME: = input.argument('name')
|
||||
exec: |
|
||||
#!bash|=
|
||||
echo "$MESSAGE from $NAME"
|
8
working-with-workspace/code/installation.txt
Normal file
8
working-with-workspace/code/installation.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Download from GitHub.
|
||||
wget https://github.com/my127/workspace/releases/download/0.1.3/ws
|
||||
|
||||
# Make it executable.
|
||||
chmod +x ws
|
||||
|
||||
# Make it accessible.
|
||||
mv ws /usr/local/bin
|
8
working-with-workspace/code/nginx-vhost.txt
Normal file
8
working-with-workspace/code/nginx-vhost.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
server {
|
||||
server_name _;
|
||||
root /app/{{ @('drupal.docroot' )}};
|
||||
|
||||
# output
|
||||
server {
|
||||
server_name _;
|
||||
root /app/web;
|
5
working-with-workspace/code/run-passthru.txt
Normal file
5
working-with-workspace/code/run-passthru.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
command('say-hello'):
|
||||
#!bash
|
||||
run echo 'Hello World'
|
||||
|
||||
passthru echo 'Hello World'
|
9
working-with-workspace/code/secrets.txt
Normal file
9
working-with-workspace/code/secrets.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
# ws secret generate-random-key
|
||||
key('default'): 'd38be3b7aa42fdbfb14c0d25f07bc1875edd5f13f640cd76'
|
||||
|
||||
# ws secret encrypt 'Hello World!'
|
||||
attribute('message'): = decrypt('YTozOntpOjA7czo3OiJkZWZhdWx0Ijt')
|
||||
|
||||
command('say-hello'): |
|
||||
#!bash|@
|
||||
echo @('message')
|
12
working-with-workspace/code/simple-command.txt
Normal file
12
working-with-workspace/code/simple-command.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
# workspace.yml
|
||||
|
||||
workspace('oliverdavies-uk'):
|
||||
description: My personal website codebase.
|
||||
|
||||
command('say-hello'):
|
||||
#!bash
|
||||
echo 'Hello world'
|
||||
|
||||
command('say-hello'):
|
||||
#!php
|
||||
echo 'Hello World';
|
34
working-with-workspace/code/workspace-talks.txt
Normal file
34
working-with-workspace/code/workspace-talks.txt
Normal file
|
@ -0,0 +1,34 @@
|
|||
attributes:
|
||||
rst2pdf:
|
||||
command: |
|
||||
= 'rst2pdf ' ~ @('rst2pdf.filename.rst') ~ '
|
||||
--break-level 1
|
||||
--stylesheets main
|
||||
--fit-background-mode scale
|
||||
--extension-module preprocess
|
||||
--output ' ~ @('rst2pdf.filename.pdf')
|
||||
filename:
|
||||
pdf: slides.pdf
|
||||
rst: slides.rst
|
||||
thumbnail:
|
||||
filename: thumbnail.png
|
||||
|
||||
command('pdf generate <talk>'): |
|
||||
#!bash|=
|
||||
cd ={ input.argument('talk') }
|
||||
passthru ={ @('rst2pdf.command') }
|
||||
|
||||
command('pdf watch <talk>'): |
|
||||
#!bash|=
|
||||
cd ={ input.argument('talk') }
|
||||
passthru nodemon -e rst,style,txt -x "={ @('rst2pdf.command') }"
|
||||
|
||||
command('thumbnail <talk>'):
|
||||
env:
|
||||
PDF_FILENAME: = @('rst2pdf.filename.pdf')
|
||||
THUMBNAIL_FILENAME: = @('thumbnail.filename')
|
||||
exec: |
|
||||
#!bash|=
|
||||
cd ={ input.argument('talk') }
|
||||
passthru gs -sDEVICE=png16m -r300 -dDownScaleFactor=4
|
||||
-sOutputFile=$THUMBNAIL_FILENAME -dLastPage=1 $PDF_FILENAME
|
Loading…
Add table
Add a link
Reference in a new issue