Skip to content

Instantly share code, notes, and snippets.

View glidenote's full-sized avatar

Akira Maeda glidenote

View GitHub Profile
#compdef hub
typeset -A opt_args
local context state line
_hub() {
_arguments -s -S \
--version \
"*::hub commands:_hub_command"
}
@glidenote
glidenote / _git.diff
Created February 24, 2012 06:36
_git.diff
diff --git a/_git b/_git
index 8a48c04..f1efd6d 100644
--- a/_git
+++ b/_git
@@ -4449,6 +4449,44 @@ _git-stripspace () {
'(-s --strip-comments)'{-s,--strip-comments}'[also strip lines starting with #]'
}
+# HUB CUSTOM COMPLETION FUNCTIONS
+
#compdef git git-cvsserver git-receive-pack git-upload-archive git-upload-pack git-shell gitk tig
# Some parts of this completion's behaviour are configurable:
#
# Say you got your own git sub-commands (git will run a program `git-foo'
# when you run "git foo") and you want "git f<tab>" to complete that sub
# commands name for you. You can make that sub-command know to the completion
# via the user-command style:
#
# % zstyle ':completion:*:*:git:*' user-commands foo:'description for foo'
@glidenote
glidenote / CHANGES
Created March 11, 2012 20:13
tmux changes
CHANGES FROM 1.5 TO 1.6, 23 January 2012
* Extend the mode-mouse option to add a third choice which means the mouse
does not enter copy mode.
* Add a -r flag to switch-client to toggle the client read-only flag.
* Add pane-base-index option.
* Support \ for line continuation in the configuration file.
* Framework for more powerful formatting of command output and use it for
list-{panes,windows,sessions}. This allows more descriptive replacements
(such as #{session_name}) and conditionals.
--- /etc/cobbler/dhcp.template.dist 2012-03-14 18:41:17.000000000 +0900
+++ /etc/cobbler/dhcp.template 2012-03-16 12:40:13.000000000 +0900
@@ -8,6 +8,8 @@
#
# ******************************************************************
+log-facility local7;
+
ddns-update-style interim;
@glidenote
glidenote / server.rb
Created March 19, 2012 07:56
server.rb
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'webrick'
include WEBrick
server = HTTPServer.new(
:DocumentRoot => File.join(Dir.pwd),
:Port => 10080
)
@glidenote
glidenote / .vimrc
Created March 26, 2012 03:47
.vimrc
Bundle 'L9'
Bundle 'FuzzyFinder'
nmap mf :FufFile <C-r>=expand(g:memolist_path."/")<CR><CR>
@glidenote
glidenote / gist:2222774
Created March 28, 2012 01:44
munin memcached plugins
cd /usr/share/munin/plugins/
https://raw.github.com/munin-monitoring/contrib/master/plugins/memcached/memcached_hits_
chmod 777 /usr/share/munin/plugins/memcached_hits_
ln -s /usr/share/munin/plugins/memcached_hits_ /etc/munin/plugins/memcached_hits_127_0_0_1_11211
ls -al /etc/munin/plugins
/usr/sbin/munin-run memcached_hits_127_0_0_1_11211
service munin-node restart
@glidenote
glidenote / gist:2235174
Created March 29, 2012 08:56
utvpnserver
#!/bin/sh
# chkconfig: 2345 99 01
# description: UT-VPN Server
DAEMON=/usr/bin/utvpnserver
LOCK=/var/lock/subsys/utvpnserver
test -x $DAEMON || exit 0
case "$1" in
start)
let g:memolist_vimfiler = 0
let g:memolist_prompt_tags = 0
let g:memolist_prompt_categories = 0