start new:
tmux
start new with session name:
tmux new -s myname
""" | |
A common use case in a Fabric script is to: | |
1. Activate the virtualenv | |
2. cd to the project dir | |
Here is a simple context manager to achieve this with a one line with statement: | |
""" | |
# fabconfig.py | |
def dev(): |
# Start the old vagrant | |
$ vagrant init centos-6.3 | |
$ vagrant up | |
# You should see a message like: | |
# [default] The guest additions on this VM do not match the install version of | |
# VirtualBox! This may cause things such as forwarded ports, shared | |
# folders, and more to not work properly. If any of those things fail on | |
# this machine, please update the guest additions and repackage the | |
# box. |
#!/bin/env python | |
# This work is licensed under the terms of the MIT license. | |
# For a copy, see <https://opensource.org/licenses/MIT>. | |
""" | |
A hook to git that removes orphan files "*.pyc" and "*.pyo" for "*.py" | |
beeing deleted or renamed by git checkout. It also removes their empty parent | |
directories. | |
Place it to "my_local_repository/.git/hooks/post-checkout" and make it executable. | |
Nothing is cleaned for .py files deleted manually or by "git rm" etc. | |
Related to http://stackoverflow.com/q/1504724/448474 |
Picking the right architecture = Picking the right battles + Managing trade-offs
Table of Contents generated with DocToc
# Remove anything linked to nvidia | |
sudo apt-get remove --purge nvidia* | |
sudo apt-get autoremove | |
# Search for your driver | |
apt search nvidia | |
# Select one driver (the last one is a decent choice) | |
sudo apt install nvidia-370 |
#!/usr/bin/env bash | |
# Update PHP Repo | |
sudo rm /etc/apt/sources.list.d/ondrej-php5-5_6-trusty.list | |
sudo add-apt-repository -y ppa:ondrej/php | |
sudo apt-get -y update | |
# Remove PHP 5.6 | |
sudo apt-get --remove purge -y php5 php5-cli php5-curl php5-gd php5-intl php5-mcrypt php5-memcached php5-mysqlnd php5-readline php5-sqlite php5-cgi php5-common php5-fpm php5-imagick php5-json php5-memcache php5-mongo php5-pgsql php5-redis php-pear | |
sudo apt-get -y autoremove |