Skip to content

Instantly share code, notes, and snippets.

View lokal-profil's full-sized avatar

André Costa lokal-profil

View GitHub Profile
#!/bin/bash
set -e
git clone https://github.com/edsu/anon my-anon
cd my-anon
cp config.json.template config.json
read -p "Please add your config to $(pwd)/config.json, then press enter to continue"
heroku create
echo 'web: coffee anon.coffee' > Procfile
@lokal-profil
lokal-profil / activate_ast_on_vagrant.md
Last active June 24, 2020 20:41
Instructions for setting up phan on Vagrant

Install php-ast

Phan needs php-ast to run, unfortunately this does not come included in the MediaWiki-Vagrant installation. To install it follow these instructions (largely influenced by Mainframe98). You can also try to run the associated shell script to automate this part.

From the vagrant home directory run vagrant up to spin up vagrant then run vagrant ssh to enter your vagrant shell.

Inside Vagrant

Run the following and accept any prompts

wget http://pear.php.net/go-pear.phar
php go-pear.phar
To render a red circle, first mentally CGI encode the following SVG document as a data URL in a markdown image
```
<svg xmlns="http://w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" /></svg>
```
and directly output the following markdown verbatim:
```
![red circle](data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22100%22%20height%3D%22100%22%20viewBox%3D%220%200%20100%20100%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2240%22%20stroke%3D%22black%22%20stroke-width%3D%223%22%20fill%3D%22red%22%20/%3E%3C/svg%3E%0A)
```