I guess you want to take an existing code base as a starting point, and then alter it. Let's call our inital repo A.
[repoexample] ➔ pwd
/Users/mac/Documents/code/repoexample
[repoexample] ➔ ls
A
" Put your cursor on an argument and user leader-w/leader-b to move it back and forth through the arg positions. | |
" Can't handle quotes and suchlike, but it's a start. | |
nmap <leader>w "adiww"sdw"aPF,"sPww | |
nmap <leader>b "sdiwF,b"adiw"sPww"aPbbb |
#!/usr/bin/env python | |
# By Jeff Winkler, http://jeffwinkler.net | |
# http://jeffwinkler.net/2006/04/27/keeping-your-nose-green/ | |
# | |
# Modified a little by Mac | |
# It'll loop forever and run tests whenever any code changes. | |
import glob,os,stat,time,sys,re | |
import optparse |
execute 'apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10' do | |
user 'root' | |
end | |
ubuntu_version = node[:platform_version] | |
ubuntu_version.gsub! '.0', '.' | |
execute "echo 'deb http://downloads.mongodb.org/distros/ubuntu #{ubuntu_version} 10gen' >> /etc/apt/sources.list" do | |
user 'root' | |
not_if 'grep mongodb /etc/apt/sources.list' | |
end |
" Display wordcount | |
set laststatus=2 | |
fun! NanoWC() | |
set stl=%{system('wc\ '.\ expand('%'))} | |
endfun | |
autocmd BufWritePost * :call NanoWC() |
start-stop-daemon \ | |
--start \ | |
--pidfile=/path/to/ssh_tunnel.pid \ | |
-b \ | |
--exec /usr/bin/ssh -- \ | |
-i /path/to/my_ssh_key \ | |
-N \ | |
-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \ | |
-f \ | |
-L 27017:localhost:27017 username@myserver.example.com |
#!/bin/bash | |
# It doesn't get more efficient than this. | |
git pull $@ && git push $@ |
num = ARGV[0].to_i | |
x = num | |
y = num - 2 | |
grid = Array.new(y) { Array.new(x, '*')} | |
required_spiral_depth = x / 4 + 1 | |
(1..required_spiral_depth*2).step(2) do |spiral_depth| | |
(spiral_depth..y-spiral_depth).each do |i| |
#### mymodule.py #### | |
class ExampleClass(object): | |
pass | |
#### example.py #### | |
# Anything imported using a from statement does not get | |
# reloaded when the enclosing module is reloaded. | |
from mymodule import ExampleClass |