Taken with Instagram at Presernov trg
finding solutions to everyday problems. coding related.
Taken with Instagram at Presernov trg
Taken with Instagram at Ljubljana
This snippet is short and helpful, though not a simple one and in cases even a dangerous one. It will help you replace text in multiple files on a Mac or Linux through a terminal.
Warning: make sure you know what you’re doing! I take NO responsibility for any damage caused by running the commands explained below!
find A_FOLDER -name '*.SOME_FILE_EXTENSION'|sed 's/ /\\ /g'|xargs perl -pi -e 's/FIND_THIS_TEXT/REPLACE_WITH_THIS_TEXT/g'
The placeholders I’ve put in the command are self-explanatory, but I’ll describe them anyway.
The breakdown of the command, just to make it easier for you to understand what we just did there:
For example, I’d replace my old company name in the header text of all source files (.m) belonging to a project named “foobar” by running the following:
find /Users/bojand/Projects/foobar -name '*.m'|sed 's/ /\\ /g'|xargs perl -pi -e 's/MyOldCompany/MyNewCompany/g'
A Cold January Night (Taken with Instagram at Ljubljana)
One rainy afternoon (Taken with instagram at Ljubljana)
Gorgeous Ljubljana (Taken with instagram)
RT @thurrott: Shhh…. It’s true: Microsoft is working on iPad apps.
Making Future Magic: iPad Light Painting
Agency Dentsu London and BERG London team up to experiment with painting 3-dimentional typography using an iPad and long exposures.
Go ahead, take 5:35 minutes to watch this and get inspired to create something incredible.
When trying to install Rails 3.0 on a fresh Ruby 1.8.7 setup on your Mac, you may get this error:
Exception `Errno::ENOENT' at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rdoc/options.rb:576 - No such file or directory - lib
File not found: lib
I’ve resolved the issue by installing rdoc and followed the instructions given by the install process:
$ sudo gem install rdoc
$ sudo gem install rdoc-data
$ sudo rdoc-data --install
$ sudo gem rdoc --all --overwrite
When trying to access a Subversionrepository with SSH using the Subversion command-line tool on Windows (svn.exe), the following error occurs:
svn: Can't create tunnel: The system cannot find the file specified.
The solution is quite simple, indeed. The only additional software needed is PuTTY (http://bit.ly/PjvGj).
Make sure your key is loaded with Pageant.
Set the SVN+SSH environment variable:
Open a new (!) command-line and try listing one of your repositories. It would look something like this:
svn list svn+ssh://user1@example.org/svn/foo/bar
Another approach is to use TortoiseSVN’s plink, which works well with the Subclipse plug-in for Eclipse.