$bid = 'myblock';
$block = \Drupal\block_content\Entity\BlockContent::load($bid);
$render = \Drupal::entityTypeManager()->getViewBuilder('block_content')->view($block);
$block_manager = \Drupal::service('plugin.manager.block');
$win_user = "ipc" | |
$linux_user = "ipc" | |
$package = "CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc" | |
$base_path = "C:\Users\" + $win_user + "\AppData\Local\Packages\" + $package + "\LocalState\rootfs" | |
$dirs = @("\bin", "\sbin", "\usr\bin", "\usr\sbin", "\home\" + $linux_user + "\.cargo\bin") | |
$dirs | ForEach { Add-MpPreference -ExclusionProcess ($base_path + $_ + "\*") } | |
Add-MpPreference -ExclusionPath $base_path |
#!/usr/bin/env bash | |
# 1. Skip steps if you already have the tools listed | |
# 2. Run source ~/.bashrc or source ~/.zshrc after each step to ensure command is registered | |
# Install Homebrew, if not installed | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Update Homebrew installed packages | |
brew update && brew upgrade |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// === Arrays | |
var [a, b] = [1, 2]; | |
console.log(a, b); | |
//=> 1 2 | |
// Use from functions, only select from pattern | |
var foo = () => [1, 2, 3]; |
cd $HOME | |
ln -s `which php54` ~/bin/php | |
export PATH=$HOME/bin:$PATH | |
curl -sS https://getcomposer.org/installer | php54 | |
echo -e "\n# Composer\nalias composer=\"php54 \$HOME/composer.phar\"" >> $HOME/.bash_profile | |
source $HOME/.bash_profile |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
<?php | |
/** | |
* Defines a style plugin | |
* | |
* - panesandblocks: corresponds to directory name of plugin | |
* - render pane: the suffix of the theme function for the pane (without "theme_"). | |
* - Example: If the function name is "theme_panesandblocks_render_pane", | |
* the value of "render pane" is "panesandblocks_render_pane". | |
* - render region: the suffix of the theme function for the region (without "theme_"). | |
* - Example: If the function name is "theme_panesandblocks_render_region", |