I hereby claim:
- I am hawkeyetwolf on github.
- I am tenderwolf (https://keybase.io/tenderwolf) on keybase.
- I have a public key ASAMt2n7czjehq8np12YvN3XgfbOIW2fjPoZioKUVryWqAo
To claim this, I am signing this object:
nvm install stable | grep -ohe 'v[0-9]*\.[0-9]*\.[0-9]*' | head -1 > .nvmrc && nvm use |
. |
I hereby claim:
To claim this, I am signing this object:
/** | |
* Overrides the theme function for the "Example" Paragraphs bundle. | |
*/ | |
function mytheme_paragraphs_item__example(&$vars) { | |
$component = 'molecules/example/example'; | |
$file = kalastatic_path_to_kalastatic() . "/src/components/$component.json"; | |
$json = file_get_contents($file); | |
$twig_template_vars = drupal_json_decode($json); | |
return twigshim_render("$component.html.twig", $twig_template_vars); | |
} |
# Thanks to Chris Hales for giving me this little snippet back in the day. | |
# Replace "__SERVER__" with "user@hostname". | |
cat ~/.ssh/id_rsa.pub | ssh __SERVER__ 'cat >> ~/.ssh/authorized_keys' | |
# Make sure permissions are correctly set on the file and its parent directory. | |
ssh __SERVER__ 'chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys' |
@see https://www.drupal.org/node/244924
Copy the code above to a file, name it fix-permissions.sh
and run it as follows:
sudo bash fix-permissions.sh --drupal_path=your/drupal/path --drupal_user=your_user_name
Note: The server group name is assumed www-data
, if it differs use the --httpd_group=GROUP
argument.
. |
<?php | |
echo "Creating hooks directory.\n"; | |
mkdir('.git/hooks', 0775, true); | |
echo "Downloading pre-commit hook.\n"; | |
$fp = fopen('.git/hooks/pre-commit', 'w'); | |
$precommit = file_get_contents('http://gitscripts.s3.amazonaws.com/pre-commit'); | |
fwrite($fp, $precommit); | |
fclose($fp); |
#!/bin/bash | |
if [ $(id -u) != 0 ]; then | |
printf "This script must be run as root.\n" | |
exit 1 | |
fi | |
drupal_path=${1%/} | |
drupal_user=${2} | |
httpd_group="${3:-www-data}" | |
# Help menu |