When you first sign up for AdSense you have to choose a default ad box size. Unfortunately, the ads displayed aren’t necessarily sized the same as the box you choose and you end up with a yellow background around the ad. To solve this problem on your WordPress blog all you need to do is set the css for the “ins” tag to white like so:
background-color: #FFFFFF !important;
On ubuntu .vimrc already exists in /usr/share/vim/vimrc. So in bash copy this file into your home directory like so:
cp /usr/share/vim/vimrc ~/.vimrc
To set tab to 4 spaces, open your vimrc file and add the following at the bottom of the file:
filetype plugin indent on
Here is a discussion on stackoverflow of various possibilities for setting tab/whitespace width in your vimrc.
Using Sublime Text I got used to using ctrl-b to “build” python. Now that I have started using Atom more I wanted this functionality for Atom too. Turns out, the package called “script” does this: https://atom.io/packages/script
First off, open your files from the powershell command line rather than by double clicking the Atom Icon. The Script package can be installed using apm install script (yes, this works in powershell under Windows!).
From the bash git command line check to see what the original origin url is:
git remote -v
The output will look something like this:
origin firstname.lastname@example.org:/home/gituser/repo.git (fetch)
origin email@example.com:/home/gituser/repo.git (push)
To change that url you run this command:
git remote set-url origin firstname.lastname@example.org:/home/gituser/repo.git
Use an ssh public key instead of having to type a password all of the time. The main thing that makes this a hassle in git bash/windows is that there is no ssh-copy-id command available.
1. Generate an ssh key using git bash (https://help.github.com/articles/generating-ssh-keys/):
ssh-keygen -t rsa -b 4096 -C “email@example.com”
2. Use this python script in git bash to copy the id_rsa.pub to the authorized keys on the remote server.
Had to comment out the mkdir and touch at lines 39 and 40 because my server already has those but otherwise the script does what it says.
3. In git bash run and follow the prompts. You will end up putting in your ssh password a couple of times but then thereafter you won’t have to.
python ssh-copy-id.py firstname.lastname@example.org
You have to set the execution policy in order to run scripts. Open Powershell as an admin and run:
C:\> Set-ExecutionPolicy RemoteSigned
Working with Python 2.7.9 installed in my path. I want to put Python 3.4 in virtualenv. Pip is included with Python 2.7.9.
pip install virtualenv
virtualenv venv -p C:\Python34\python.exe
This bug: https://bugs.launchpad.net/ubuntu/+source/python3.4/+bug/1290847
sudo apt-get install python-virtualenv
virtualenv myvenv -p python3