sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
1. Install oh-my-zsh | |
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" | |
2. Clone necessary plugins. | |
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions | |
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting | |
3. Add plugins to ~/.zshrc as | |
plugins = ( [plugins...] zsh-autosuggestions zsh-history-substring-search zsh-syntax-highlighting) |
Disable vim automatic visual mode on mouse select | |
issue: :set mouse-=a | |
add to ~/.vimrc: set mouse-=a | |
my ~/.vimrc for preserving global defaults and only changing one option: | |
source $VIMRUNTIME/defaults.vim | |
set mouse-=a |
This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
/** | |
* "Google Now" Card | |
*/ | |
body { | |
background: #e1e1e1; | |
min-height: 100%; | |
margin: auto; | |
} | |
ul.gNow { | |
width: 450px; |
brew uninstall imagemagick | |
cd /usr/local/Cellar | |
git checkout 834ce4a /usr/local/Library/Formula/imagemagick.rb | |
brew install imagemagick |
brew update | |
brew versions FORMULA | |
cd `brew --prefix` | |
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions" | |
brew install FORMULA | |
brew switch FORMULA VERSION | |
git checkout -- Library/Formula/FORMULA.rb # reset formula | |
## Example: Using Subversion 1.6.17 | |
# |
#!/bin/bash | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the active virtualenv | |
# * the branch/status of the current git repository | |
# * the return value of the previous command | |
# * the fact you just came from Windows and are used to having newlines in | |
# your prompts. |
# Solution from http://www.jamiepenney.co.nz/2011/09/23/testing-content_for-in-rails-3-x-helpers-with-rspec/ | |
describe ApplicationHelper do | |
describe "title" do | |
it "should return an h2 tag with the given title" do | |
helper.title("Lorem Ipsum") | |
helper.content_for(:page_title).should eql "<h2>Lorem Ipsum</h2>" | |
end | |
it "should return the supplied block if a block was given" do |
#-*- coding: utf-8 -*- | |
import urlparse | |
from django.contrib.auth import REDIRECT_FIELD_NAME, login | |
from django.contrib.auth.forms import AuthenticationForm | |
from django.http import HttpResponseRedirect | |
from django.utils.decorators import method_decorator | |
from django.views.decorators.cache import never_cache | |
from django.views.decorators.csrf import csrf_protect | |
from django.views.generic.edit import FormView | |
from django.conf import settings |