Add a file called .bashrc to your home folder. Open the file and paste in:
#!/bin/bash
eval `ssh-agent -s`
ssh-add
# Stop ssh-agent if session is closed.
input { | |
&+ label { | |
line-height: 1.2em; | |
} | |
/* Checkboxes */ | |
&[type="checkbox"] { | |
display: none; | |
&:checked + label:before { |
<?php | |
namespace AppBundle\Validator\Constraints; | |
use Symfony\Component\Validator\Constraint; | |
/** | |
* @Annotation | |
*/ | |
class ContainsNumeric extends Constraint |
#!/bin/bash | |
# 1. git fsck --lost-found | |
# 2. run this script via bash restore.php | |
cd PATH_TO/.git/lost-found/other | |
FILES=* | |
COUNTER=0 | |
for f in $FILES; do | |
echo "Processing $f file..." | |
git show $f > "PATH_TO/recover/$COUNTER.txt" |
// Detection if an element is added to DOM | |
function onElementInserted(containerSelector, elementSelector, callback) { | |
var onMutationsObserved = function(mutations) { | |
mutations.forEach(function(mutation) { | |
if (mutation.addedNodes.length) { | |
var elements = $(mutation.addedNodes).find(elementSelector); | |
for (var i = 0, len = elements.length; i < len; i++) { | |
callback(elements[i]); | |
} | |
} |
Needs the patch: https://www.drupal.org/node/1848686
Split "Administer vocabularies and terms" permission: Access the taxonomy overview page and Add terms in vocabulary name
File structure:
mymodule
|- src
Global Coder Install | |
$ composer global require drupal/coder | |
PHPCS zur Pfadvariable hinzufügen in ~/.profile, ~/.bash_profile oder ~/.bashrc | |
export PATH="$HOME/AppData/Roaming/Composer/vendor/bin:$PATH" | |
Standards registrieren | |
$ phpcs --config-set installed_paths C:\Users\[USER]\AppData/Roaming/Composer/vendor/drupal/coder/coder_sniffer | |
Prüfung durchführen mit |
# Enable maintanance mode | |
drush state-set system.maintenance_mode 1 | |
# Backup file field data | |
drush sql-query "CREATE TABLE media__field_file_bak AS SELECT * FROM media__field_file;" | |
drush sql-query "CREATE TABLE media_revision__field_file_bak AS SELECT * FROM media_revision__field_file;" | |
# Truncate file field tables (need to change storage settings) | |
drush sql-query "TRUNCATE media__field_file;" | |
drush sql-query "TRUNCATE media_revision__field_file;" |
#### | |
## Blackfire config - `lando rebuild` required | |
#### | |
BLACKFIRE_CLIENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx | |
BLACKFIRE_CLIENT_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
BLACKFIRE_SERVER_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx | |
BLACKFIRE_SERVER_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
#!/usr/bin/python | |
import fileinput | |
import json | |
print json.dumps( json.loads(''.join([line.strip() for line in fileinput.input()])), sort_keys=True, indent=2) |