The terminal session below shows how to use XARGS to remove a series of files from the git repos. Thanks to Ben Pickles for suggesting the use of XARGS.
$(parser_update):~/Projects/media-importer$ gst
# On branch parser_update
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: app/models/supplier.rb
# modified: lib/importer.rb
# new file: lib/importer/read.rb
# new file: lib/importer/read/folder.rb
# new file: lib/importer/read/meta.rb
#
# Changed but not updated:
# (use "git add/rm <file>..." to update what will be committed)
#
# deleted: lib/importer/folder_reader.rb
# deleted: vendor/plugins/backgroundrb
#
$(parser_update):~/Projects/media-importer$ git ls-files --deleted
lib/default/importer/folder_reader.rb
vendor/plugins/delayed_job
$(parser_update):~/Projects/media-importer$ git ls-files --deleted | xargs git rm
rm 'lib/default/importer/folder_reader.rb'
rm 'vendor/plugins/delayed_job'
To make things easy in future I’ve created a grall or git-remove-all alias in my bin/aliases file.
alias grall='git ls-files --deleted | xargs git rm'
Dan Udey sent through a sweet and simple hack for installing libmemcached 0.25.14 today. His post includes an additional hack allowing variants of a single port.
So if your like me and have a port installed environment it’s kinda tricky to get libmemcached 0.25.14 installed to be compatable with the current memcached-0.14 gem.
1. If you alread have libmemcached installed, say 0.25 then deactivate it:
sudo port deactivate libmemcached
2. Edit the portfile for libmemcached
sudo port edit libmemcached
Add in the content below:
- $Id: Portfile 46340 2009-02-03 03:08:47Z brett@macports.org $
PortSystem 1.0
name libmemcached
version 0.25.14
description libmemcached is a C and C++ client library to the memcached server
long_description libmemcached is a C and C++ client library for memcached. \
It has been designed to be light on memory usage, thread safe, \
and provide full access to server side methods.\
\
Patched to support memcached ruby gem.
maintainers brett@macports.org
categories devel
platforms darwin
homepage http://blog.evanweaver.com/articles/2009/01/24/secret-codes/
master_sites http://blog.evanweaver.com/files/
checksums md5 c859f1121f936dbb67804b3fc3d9e9b9 \
sha1 bf4a34f4d8f9163bb492cf02e984254f5043e519 \
rmd160 7aac89b5e36bd07213c07e8ed4a1f5ffde5e2482
configure.args —mandir=${prefix}/share/man
3. Install the port
sudo port install libmemcached
4. Install the gem
sudo gem install memcached
Building native extensions. This could take a while...
Successfully installed memcached-0.14
1 gem installed
Installing ri documentation for memcached-0.14...
1. Generate the rdoc for the interesting gem. It probably would have been installed with the gem but just to be sureā¦
sudo gem rdoc jchris-couchrest gem serverhttp://localhost:8808
I must have conveyed my frustration well they other day when trying to use VI for a few quick edits. It seemed like VI was playing up, inserting A’s and B’s for and arrow key press. I finally switched to nano to get the edit done. Over the weekend i received an email from Ben Pickles who was rebuilding his slice host and came across a solution. It proved to be some late grease for my squeaky VI problem, much appreciated Ben!
From a comment in this article:
Darryl Hamilton commented Thu May 08 20:18:23 UTC 2008 ago:
What you’ll want to do is set vi (or in this case, vim) into nocompatible mode. To do this, type ‘:set nocompatible’ (without the quotes) in any vi session.
To make that change permanent, create a file called .vimrc in your home dir, with ‘set nocompatible’ in it (without the quotes)