Editing:
- Copy:
Command + C - Cut:
Command + X - Paste:
Command + V - Cursor to end of line:
Command + Right Arrow - Cursor to beginning of line:
Command + Left Arrow
| #!/bin/bash | |
| # To ~/.bashrc file add line: | |
| # source ~/.git-plugin-bash.sh | |
| # Based on Oh My Zsh Git plugin (without zsh functions): | |
| # https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/git/git.plugin.zsh | |
| # https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git | |
| # |
| set nocp | |
| set nocompatible | |
| set nu | |
| syntax enable | |
| set autoindent | |
| set expandtab | |
| set tabstop=4 | |
| set shiftwidth=4 | |
| set list | |
| set list listchars= |
| from __future__ import absolute_import | |
| from time import time, sleep | |
| import uuid | |
| class RedisSemaphore(object): | |
| """ | |
| Redis base semaphore. Supports timeouts of semaphore locks. | |
| """ |
| # -*- coding: utf-8 -*- | |
| import os | |
| os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings") | |
| import newrelic.agent | |
| newrelic.agent.initialize(os.path.join(os.path.dirname(os.path.dirname(__file__), 'newrelic.ini') | |
| from django.core.wsgi import get_wsgi_application | |
| application = get_wsgi_application() |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |