Written on 7:29:00 AM by S. Potter
[user]
name = Susan Potter # make sure you change this
email = me@susanpotter.net # make sure you change this
[color]
diff = auto
status = auto
branch = auto
[diff]
rename = copy
color = auto
[apply]
whitespace = strip
[pager]
color = true
[status]
color = auto
[alias]
co = "checkout"
ci = "commit"
ciall = "commit -a -v"
unmerge = "reset --hard ORIG_HEAD"
lsbr = "branch -a" # list all branches, even remote ones
mkbr = "branch" # create branch if you specify a branch name after it, e.g. git mkbr upgrading_rails
# remove branch named after it, e.g. git rmbr upgrading_rails
rmbr = "branch -d"
# rename branch from one name to another
mvbr = "branch -m"
#
track = "branch --track"
# list all tags, to keep commands consistent, e.g. git lstag
lstag = "tag -l"
# create a new tag based on specified commit
mktag = "tag -a"
# remove existing tag by name
rmtag = "tag -d"
# rename tag from one name to another
mvtag = "tag -m"
# create new remote repository for project
mkrem = "remote add"
# list remote repositories
lsrem = "remote"
# show status, keep same as svn command I used most frequently
st = "status"
# another alias for status that some scripts might use
stat = "status"
# fetch and rebase from svn repository
spull = !git svn fetch && git svn rebase
# push keeping each local commit as atomic.
spush = !git svn dcommit
# initialize all submodules
modinit = "submodule init"
# update all submodules
modup = "submodule update"
# show status of all submodules
modst = "submodule status"
# add new submodule, i.e. git modadd module-name url
modadd = "submodule add"
# show last 15 log entries
recentlog = "log -n 15"
# push local committed changes to rubyforge and origin (usually GitHub)
osspush = !git push rubyforge master && git push origin master
# pull changes from rubyforge and origin (usually GitHub)
osspull = !git pull rubyforge master && git pull origin master
# sync (pull then push) from rubyforge and origin (usually GitHub)
osssync = !git osspull && git osspush
Place your
.gitconfig file in your home directory, e.g.
/home/username
Last updated: 2008-06-28
Posted in
git,
scm
|
|
Written on 2:18:00 AM by S. Potter
After Twitter.com added a few extra APIs for favoriting statuses in October, I finally got around to adding them to Twitter4R tonight. Since there is new functionality I have released it as version 0.3.0.
To install all you need to do is:
$ sudo gem install twitter4r
The Rubyforge mirrors might still be syncing if you are doing this soon after I post this message.
The changes to the library include:
- Added
Twitter::Client#authenticate? method that is a lightweight way to verify a Twitter user's credentials - Favorites: allows Twitterers to add statuses to their favorites, list all their current favorites and remove any statuses from the list.
Example code for verifying a user would look like:
gem('twitter4r', '>=0.3.0')
require('twitter')
client = Twitter::Client.new
unless client.authenticate?("macdeveloperthatlovesleopard", "iamasciolists")
puts "Password does not describe user well!"
end
if client.authenticate?("developerthatdoesnotpretendtobegraphicdesigner", "seriousdevelopernotfakestevejobswannabe")
puts "Password does describe user well!"
end
Example code for using the favorites API:
gem('twitter4r', '>=0.3.0')
require('twitter')
require('twitter/console')
client = Twitter::Client.from_config('some/path.yml')
statuses = client.favorites
ids = statuses.collect {|s| s.id }
# clean favorites list by deleting
statuses.each {|s| client.favorite(:remove, s) }
# now add back first status id from original favorites list
client.favorite(:add, ids[0])
Enjoy!
Posted in
open source,
opensource,
oss,
ruby,
rubyforge,
twitter,
twitter twitter4r,
twitter4r
|
|