git remote -v
should give something like
origin git@github.com:/.git (fetch)
| <?php | |
| // YouTube id from url. | |
| // @see http://stackoverflow.com/a/6382259/351590 | |
| if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $url, $match)) { | |
| $video_id = $match[2]; | |
| } |
| <?php | |
| $entity_type = 'node'; | |
| $bundle = 'page'; | |
| $field_name = 'field_description'; | |
| $fsc = FieldStorageConfig::loadByName($entity_type, $field_name); | |
| $fc = FieldConfig::loadByName($entity_type, $bundle, $field_name); | |
| $display = entity_get_display($entity_type, $bundle, 'default'); | |
| $form_display = entity_get_form_display($entity_type, $bundle, 'default'); |
git remote -v
should give something like
origin git@github.com:/.git (fetch)
https://getcomposer.org/doc/articles/troubleshooting.md#xdebug-impact-on-composer https://github.com/Homebrew/homebrew-php/issues/2536#issuecomment-178798390
Comment out the line enable xdebug in /usr/local/etc/php/5.6/conf.d/ext-xdebug.ini
[xdebug]
;zend_extension="/usr/local/opt/php56-xdebug/xdebug.so"
| // adding a debounce function in order to prevent the resize | |
| // code from being called too often. | |
| // @see http://stackoverflow.com/a/9828919 | |
| // @see https://davidwalsh.name/javascript-debounce-function | |
| // Returns a function, that, as long as it continues to be invoked, will not | |
| // be triggered. The function will be called after it stops being called for | |
| // N milliseconds. If `immediate` is passed, trigger the function on the | |
| // leading edge, instead of the trailing. | |
| var debounce = function (func, wait, immediate) { | |
| var timeout; |
| # Create a bookmark using the following command | |
| hash -d -- bookmark_name=/path/to/dir | |
| # Access using | |
| cd ~bookmark_name |
| # THESE COMMANDS HAVE TO BE RUN FROM INSIDE AN EXISTING DOCROOT | |
| # Get docroot path | |
| drush st root --no-field-labels --format=list | |
| # Generate Drupal Hash - Drupal 8 | |
| drush php:eval '$hash = Drupal\Component\Utility\Crypt::randomBytesBase64(55); print $hash . "\n";' | |
| # Generate Drupal Hash - Drupal 7 | |
| drush php:eval '$hash = drupal_random_key(); print $hash . "\n";' |
| .parent-element { | |
| -webkit-transform-style: preserve-3d; | |
| -moz-transform-style: preserve-3d; | |
| transform-style: preserve-3d; | |
| } | |
| .element { | |
| position: relative; | |
| top: 50%; | |
| transform: translateY(-50%); |
| #!/bin/bash | |
| sed -i 's/archive.ubuntu.com/au.archive.ubuntu.com/g' /etc/apt/sources.list |
| #!/bin/bash | |
| adduser yusuf | |
| usermod -aG sudo yusuf | |
| echo 'yusuf ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/custom && chmod 0440 /etc/sudoers.d/custom |