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
// Context: Within a formElement, inside a FormWidget | |
$element += array( | |
'#type' => 'fieldset', | |
'#attributes' => array('class' => array('container-inline')), | |
); |
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
http://blog.netgloo.com/2016/04/16/drupal-8-creating-a-new-custom-field-type/ | |
https://stackoverflow.com/questions/38996037/drupal-8-field-plugin-with-field-type-managed-file?rq=1 | |
https://evolvingweb.ca/blog/burrito-maker-how-create-custom-fields-drupal-8 | |
https://github.com/geerlingguy/demo-drupal-8/tree/master/core/lib/Drupal/Core/Field/Plugin/Field | |
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
# A global recipe to set up a new workstation. For the on-boarding of new workmates. | |
## Getting Google Chrome | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
sudo apt-get install libxss1 libgconf2-4 libappindicator1 libindicator7 | |
sudo dpkg -i google-chrome-stable_current_amd64.deb | |
## Setting up a LAMP environment | |
sudo apt-get update | |
sudo apt-get install apache2 mysql-server php libapache2-mod-php php-mcrypt php-mysql |
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
git rm -r --cached . | |
git add -A | |
git commit -am 'Basic workflow to clean git with ignored files from a new gitignore' |
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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
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
sudo apt-get install sqlite3 sqlite3-doc libsqlite3-dev |
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
## looking for a package within the system | |
rpm -aq | grep packagename | |
## looking for a package in the repo | |
yum search package | |
## uninstall packages | |
yum erase package | |
## Apache restart |
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 | |
// Delete all nodes. | |
entity_delete_multiple('node', \Drupal::entityQuery('node')->execute()); | |
// Delete all files. | |
entity_delete_multiple('file', \Drupal::entityQuery('file')->execute()); | |
// Delete all taxonomy terms. | |
entity_delete_multiple('taxonomy_term', \Drupal::entityQuery('taxonomy_term')->execute()); |
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
# .bashrc | |
# User specific aliases and functions | |
alias rm='rm -i' | |
alias cp='cp -i' | |
alias mv='mv -i' | |
# Source global definitions | |
if [ -f /etc/bashrc ]; 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
:w !sudo tee % |