Prventing .DS_Store from being created in my web projects - macos

How can I prevent OSX .DS_Store files from being created in my PHP projects? It's so annoying and I have to manually delete them when I want to put my app online or compress it and send it.
Thanks.

Simple answer: you can't. But, why do you care? They don't hurt if you deploy them to the web server. Also you can make a script to delete them, especially if you make a script to zip/tar your distribution you can also let it either delete the files or tar/zip in a way ignoring them. Like tar cfX dist.tar ./.DS_Store * will tar all folders/files in the current directory but exclude (capital X switch) the .DS_Store file.

Related

No such file or directory in MAC Terminal

I want to access to a directory of an xcode project that contains cocoapods (firebase framework) in my Desktop! But I keep getting: No such file or directory!
I tried to access to another non-project folder and it worked.
It also worked when I tried to access to a project folder that does not contain cocoapods!
I don't know why I could not access to any project folder that contains cocoapods!
When I list the contents of the desktop I got:
There is an # in the properties
What does that means and how can I access to the folder?
I just want to upload it to the Github? any solutions?
BusinessWallet is probably a framework bundle, which means that it is actually just one file, but appears as a directory in Finder. You can copy individual files out of it in Finder.
If you need programmatic access to contents inside the bundle, take a look here: https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/AccessingaBundlesContents/AccessingaBundlesContents.html

Prevent Docpad from scanning vendor files (but still copy them)

I've got a project which holds third party files (installed with Bower) under src/public/vendor. It seems ever since I added those docpad has gotten considerably slower in generating ./out, no doubt cause it's going over all the vendor files.
I'd like to exclude the vendor files from being interpreted by DocPad, but they should still be copied to ./out.
Is there a built-in way to do this through DocPad or should I simply put the vendor files outside the src directory and have Grunt copy it manually to ./out?
Your issue is legit and I raised the same a while ago :
https://github.com/bevry/docpad/issues/276
In the end, hypercubed developed the "raw" plugin available through npm :
https://npmjs.org/package/docpad-plugin-raw
Depending on what you provide as options, it can either do a cp or a rsync command.
So it basically what you intend to do with a Grunt task.

Building Qt once added to subversion?

I need to make some changes to Qt 4.7.1, so I need to add it to my subversion server to track my changes. However, once it's added, the configure script fails. I'm guessing it's choking on the .svn files.
I'm using Windows. Is there any way to add Qt to subversion, delete all the .svn folders, configure and build it, recreate the .svn folders, and then submit my changes?
Or is there any other work around? The error I get is 'Couldn't update default mkspec'
Here is what I would have done:
Install Qt in some folder.
Make sure that auto-props and global-ignores are set up properly.
Rename the whole folder.
Create an empty repository.
Create an empty folder having the same name as the original one.
Import the empty folder into the repository.
Remove the folder.
Check out the folder.
Copy the contents of the backup to the working copy.
Carefully add everything you want to be source controlled, probably using the -N or --depth options.
Put everything else into appropriate svn:ignore properties.
Commit.
Compare the working copy and the backup.
If there are any differences, wipe both the working directory and the repository, then repeat from the step 2, correcting the mistakes.
It may seem a bit of overkill, but importing such a large project into an SVN repository isn't a trivial task.
The problem is if .svn folders exist in /mkspecs/default and /mkspecs-win32-msvc2008 then configure fails to run with the error 'Couldn't update default mkspec'
If I move the .svn folders, configure, then replace them, I can then build.

Xcode - build phase or script for copying only modified files to App Bundle

Mac OS X 10.5 compatibility required. Xcode 3.2.5.
My app looks in the bundle's Resources folder, for a "data" folder.
"data" contains a hierarchy of subfolders and data. The contents are constantly being modified.
I don't need to navigate or modify this data within Xcode.
Q. When building, how can I copy "data" (say, from the Xcode project's folder) to the Resources folder, but only copying those files within "data" that have been modified since the last build?
(Simply copying all files every time I build is not feasible; the file sizes are too large, slowing build times.)
Thanks for any help.
Shouldn't be a problem to use rsync in a shell script build phase. Something like this:
rsync -a "${SRCROOT}/data" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
That does a bit more than date comparison but it should still be quite a bit faster than what you're doing now.
The above doesn't delete any files you removed from the source directory; to do so, you can add --delete but I'd only suggest doing that after you're sure it's working properly.

How to configure Hudson to archive empty folders

I have the following sample / test configuration that has Hudson create a directory of empty folders. Its then instructed to archive everything within that folder, except it will not match empty folders and ends up archiving nothing. Whats more annoying is that Hudson does not alert you that nothing matches the search string "root**", but when it builds, it says nothing matches the search string.
(source: 86th.org)
We need Hudson to archive these empty folders for our installer since its expecting them. I fear this may not be possible because of the text "Files to archive".
At any rate, How can I configure Hudson to archive empty folders as an artifact.
You should create the artifact that you want in your build scripts, and then have hudson archive that file. So if you want a zip file that contains empty folders, do the appripriate zip command in your batch file or ant script. Then archive the output file.
Looking at the Hudson source code, it seems as if artifact archiving is meant to only match against files.
You might want to file a feature request or send an email to the USERS list, the Hudson team is pretty good about replying to requests and/or adding features in new releases.
I see three ways:
have your application NOT expect the folders but create them on demand.
or have the application create the folders at startup.
or you could just add dummy files in the folders :) just thinking out of the box.

Resources