- Go programmers typically keep all their Go code in a single workspace.
- A workspace contains many version control repositories (managed by Git, for example).
- Each repository contains one or more packages.
| # Set up a development environment on an Ubuntu flavored linux distribution | |
| # install and sets up: | |
| # rbenv, nvm, mysql, postgres, redis | |
| # vscode, slack, docker, chormium, tilix, heroku, postman, beekeeper, skype, kazam, peek and more | |
| # setup an rsa key | |
| # Usage: | |
| # install ansible 2.7+ - latest | |
| ## sudo apt-add-repository ppa:ansible/ansible && sudo apt update && sudo apt install ansible | |
| # run the playbook: | |
| ## ansible-playbook webdev.yaml -K -e "email=<[email protected]>" |
| git config --global alias.plom '!git pull origin master' | |
| git config --global alias.psom '!git push origin master' | |
| git config --global alias.plod '!git pull origin develop' | |
| git config --global alias.psod '!git push origin develop' | |
| git config --global alias.plum '!git pull upstream master' | |
| git config --global alias.plud '!git pull upstream develop' | |
| git config --global alias.plrum '!git pull --rebase upstream master' | |
| git config --global alias.plrom '!git pull --rebase origin master' |
| commands: | |
| 00_install_dev_tools: | |
| command: "yum groupinstall 'Development Tools' -y" | |
| packages: | |
| yum: | |
| git: [] | |
| htop: [] | |
| geoip: [] | |
| geoip-devel: [] | |
| gcc-c++: [] |
| # Sample Nginx config with sane caching settings for modern web development | |
| # | |
| # Motivation: | |
| # Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools. | |
| # These tools automatically deactivate all sorts of caching for you, so you always have a fresh | |
| # and juicy version of your assets available. | |
| # At some point, however, you want to show your work to testers, your boss or your client. | |
| # After you implemented and deployed their feedback, they reload the testing page – and report | |
| # the exact same issues as before! What happened? Of course, they did not have developer tools | |
| # open, and of course, they did not empty their caches before navigating to your site. |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com, example2.com, and example1.com/images on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
| # Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail | |
| # Make sure you have IMAP enabled in your gmail settings. | |
| # Right now it won't download same file name twice even if their contents are different. | |
| import email | |
| import getpass, imaplib | |
| import os | |
| import sys | |
| detach_dir = '.' |
Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down
One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.
Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o