- using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml- using inventory:
127.0.0.1 ansible_connection=localansible-playbook --connection=local 127.0.0.1 playbook.yml127.0.0.1 ansible_connection=local| # best practice: linux | |
| nano ~/.pgpass | |
| *:5432:*:username:password | |
| chmod 0600 ~/.pgpass | |
| # best practice: windows | |
| edit %APPDATA%\postgresql\pgpass.conf | |
| *:5432:*:username:password | |
| # linux |
| # download source https://www.python.org/downloads/release/python-2712/ | |
| wget https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz | |
| tar -zxvf Python-2.7.12.tgz | |
| cd Python-2.7.12 | |
| # install | |
| ./configure | |
| make | |
| sudo make install |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
| #include <chrono> | |
| #include <ctime> | |
| #include <iostream> | |
| int main() { | |
| // std::chrono only | |
| auto now = std::chrono::system_clock::now(); | |
| std::cout << "std::chrono only: " << std::chrono::duration_cast<std::chrono::seconds>(now.time_since_epoch()).count() << std::endl; |
| axios({ | |
| url: 'http://localhost:5000/static/example.pdf', | |
| method: 'GET', | |
| responseType: 'blob', // important | |
| }).then((response) => { | |
| const url = window.URL.createObjectURL(new Blob([response.data])); | |
| const link = document.createElement('a'); | |
| link.href = url; | |
| link.setAttribute('download', 'file.pdf'); | |
| document.body.appendChild(link); |
| <!-- | |
| In this file, the fields can be set to "required", but that will | |
| cause issues. Specifically, when someone clicks "Remove" the fields | |
| will be hidden and unless the "required" prop is set to false the form | |
| will not submit. Also note that when showing this line if the object | |
| is marked_for_destruction? it should be hidden. The javascript below | |
| will handle both these issues. | |
| --> | |
| <tr class="line_item subform fields" id="line_item_<%= f.object.id %>"> | |
| <td> |
rebase vs merge).rebase vs merge)reset vs checkout vs revert)git rev-parse)pull vs fetch)stash vs branch)reset vs checkout vs revert)If you are an Oh-my-zsh user, see the Laravel 5 plugin
For the rest of us Bash users, all of the Laravel Artisan autocomplete solutions out there require installing a composer package to get a list of artisan commands. Turns out this isn't really necessary. Simply add the provided code in ~/.bash_profile ( or similarly sourced file ) and you'll get artisan command tab completes on any project on your system.
_artisan()
{
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
COMMANDS=`php artisan --raw --no-ansi list | sed "s/[[:space:]].*//g"`
COMPREPLY=(`compgen -W "$COMMANDS" -- "${COMP_WORDS[COMP_CWORD]}"`)