To setup your computer to work with *.dev domains, e.g. project.dev, awesome.dev and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion
| # --------------------------------------------------------------------------- | |
| # | |
| # Description: This file holds all my BASH configurations and aliases | |
| # | |
| # Sections: | |
| # 1. Environment Configuration | |
| # 2. Make Terminal Better (remapping defaults and adding functionality) | |
| # 3. File and Folder Management | |
| # 4. Searching | |
| # 5. Process Management |
To setup your computer to work with *.dev domains, e.g. project.dev, awesome.dev and so on, without having to add to your hosts file each time.
| # Install `dnsmasq` and configure for *.dev domains | |
| $ brew install dnsmasq | |
| $ vim /usr/local/etc/dnsmasq.conf | |
| # Reload configuration and clear cache | |
| $ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
| $ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
| $ dscacheutil -flushcache |
| <?php | |
| // D8 themes, should go in MYDOPEASSTHEME.theme | |
| /** | |
| * Implements hook_theme_suggestions_HOOK_alter(). | |
| */ | |
| function MYDOPEASSTHEME_theme_suggestions_page_alter(array &$suggestions, array $vars) { | |
| $node = \Drupal::routeMatch()->getParameter('node'); | |
| if (!empty($node)) { |
I hereby claim:
To claim this, I am signing this object:
| // https://developer.mozilla.org/en-US/docs/Web/API/Element/classList | |
| // https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight | |
| function toggleHider() { | |
| var hiderToggle = document.getElementsByClassName('hider__toggle')[0]; | |
| hiderToggle.classList.toggle('is-open'); | |
| var hiderContent = document.getElementsByClassName('hider__content')[0]; |
| $icon-size: 5.417em; //65px | |
| .icon { | |
| transition: transform .25s ease; | |
| width: $icon-size; | |
| height: $icon-size; | |
| display: inline-block; | |
| background-image: url('../img/sprite-icons.svg'); // icons are 75x75 | |
| background-position: 0 0; | |
| background-size: auto 100%; |
| // ### customize webforms | |
| // 00. Make sure `webforms` module is install in drupal | |
| // 01. login as admin and go into `structure > webforms`. | |
| // 02. find the row of your form, click `build` on the far right | |
| // 03. click on `+ Add Element` button near top of table | |
| // 04. in filter input box, type `container`, then click `Add Element` | |
| // 05. in the "Key" input field, type in something descriptive. I reccommend `{FORMNAME}__group_{#}`. Replace `{FORMNAME}` with the form name and `{#}` with a number. ex: `myform__group_2` | |
| // 06. now, click on the `Advanced` tab near the top. | |
| // 07. now click in the input field `Element CSS Classes`. Select `Custom`. | |
| // 08. a new input field shows up underneath. type in one of the following classes: |
| Module | Description |
|---|---|
address |
robust address field for locations |
admin_toolbar |
dropdown admin menus |
anchor_link |
|
better_exposed_filters |
|
captcha |
spam protection for webforms |
crop |
expose image cropping api |
cshs |
|
ctools |
needed by pathauto |
There are many Git workflows out there, I heavily suggest also reading the atlassian.com [Git Workflow][article] article as there is more detail then presented here.
The two prevailing workflows are [Gitflow][gitflow] and [feature branches][feature]. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited.
When using Bash in the command line, it leaves a bit to be desired when it comes to awareness of state. I would suggest following these instructions on [setting up GIT Bash autocompletion][git-auto].
When working with a centralized workflow the concepts are simple, master represented the official history and is always deployable. With each now scope of work, aka feature, the developer is to create a new branch. For clarity, make sure to use descriptive names like transaction-fail-message or github-oauth for your branches.