1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts
3.) Run the command fc-cache -fv to manually rebuild the font cache
1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts
3.) Run the command fc-cache -fv to manually rebuild the font cache
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\field\Entity\FieldConfig;
$bundles = ['user'];
$fields['user_picture'] = [
'type' => 'image',
'entity_type' => 'user',
'bundle' => 'user',This is a guide on how to send a properly formatted multipart email. Multipart email strings are MIME encoded, raw text email templates. This method of structuring an email allows for multiple versions of the same email to support different email clients.
// Example Multipart Email:
From: [email protected]
To: [email protected]
Subject: Multipart Email Example
Content-Type: multipart/alternative; boundary="boundary-string"
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.
| {% set no_protocol = url|split('//')[1] ?: url %} | |
| {% set only_domains = no_protocol|split('/')[0] ?: no_protocol %} | |
| {% set url_domain = '' %} | |
| {% if only_domains|split('.')[2] %} | |
| {% set url_domain = only_domains|split('.')[1] %} | |
| {% else %} | |
| {% set url_domain = only_domains|split('.')[0] %} | |
| {% endif %} |
| #!/bin/bash | |
| #============================================================================== | |
| #TITLE: mysql_backup.sh | |
| #DESCRIPTION: script for automating the daily mysql backups on development computer | |
| #AUTHOR: tleish | |
| #DATE: 2013-12-20 | |
| #VERSION: 0.4 | |
| #USAGE: ./mysql_backup.sh | |
| #CRON: | |
| # example cron for daily db backup @ 9:15 am |
| Note: I've left some of the full package names in tact to show exactly where the class comes from. | |
| #### Pull dependencies in using composer #### | |
| //Example composer.json | |
| { | |
| "require": { | |
| "symfony/config" : "2.1.0", | |
| "symfony/yaml" : "2.1.0", | |
| "twig/twig": "1.9.0", |
| <?php | |
| /** | |
| * This is free and unencumbered software released into the public domain. | |
| * | |
| * Anyone is free to copy, modify, publish, use, compile, sell, or | |
| * distribute this software, either in source code form or as a compiled | |
| * binary, for any purpose, commercial or non-commercial, and by any | |
| * means. | |
| * |