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 | |
### Setup: source this script from your .bashrc or .bash_profile | |
### In Cygwin, you can use Putty (Plink + Pageant) for GIT - see https://git-scm.com/docs/git | |
export GIT_SSH_COMMAND='"/cygdrive/c/Program Files/PuTTY/plink.exe" -agent' | |
export GIT_SSH_VARIANT='plink' | |
### Some tools don't like Putty (e.g. Ansible): then use also "ssh-agent" | |
environ="$HOME/.ssh/environment" | |
if [ -f "$environ" ]; then |
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
<?php | |
tokens = $twig->tokenize($loader->getSourceContext('index.html')); | |
$templateVars = []; | |
while (!$tokens->isEOF()) { | |
$token = $tokens->next(); | |
if ($token->getType() === \Twig_Token::VAR_START_TYPE) { | |
$templateVars[] = $tokens->next()->getValue(); | |
$tokens->next(); | |
} | |
} |