Coda Snippet Sync - code-snippets

I've been trying to rack my head around making a coda plugin for syncing coda's clips to snipplr.com, coda is such a great app, but the inability to sync my hand crafted snippets is really irritating especially when you are out and about with a laptop!
I was wondering if anyone has any experience in developing such a plugin, or even had any success with syncing snippets across computers?
Hope you guys can help!

I don't think it is doable at this time...
I wanted to do the same but it looks like the clips are stored in this (binary?) file: /Applications/Coda.app/Contents/MacOS/Coda
The Panic team will have to create an altenate location for this and also the sites database... it would be really nice if we could sync all our settings/sites/connections/clips and sync them via dropbox
let's not hold our breath... try my recommendation for syncing snippets/clips:
https://stackoverflow.com/questions/4101/where-do-you-store-your-code-snippets/2944840#2944840

Combining information I found here on where Clips are stored: https://github.com/bobthecow/codaclips/pull/1#issuecomment-6023192
~/Library/Application Support/Coda 2/
With how to make a symlink:
ln -s /Users/[username]/Google\ Drive/Clips /Users/[username]/Library/Application\ Support/Coda\ 2
You could replace the path to Google Drive to other services such as Dropbox as well. Just symlink it.
Thats how I sync my clips across computers. Hopefully that helps someone else. Note: this will sync all clips, not just specific groupings. You could apply the same logic to Sites and other settings as well if you wanted.

Related

iOS:How to check if an directory already exists on the FTP server while uploading?

I am working on an App, in which I want to upload images and pdf to the FTP server. I am using this reference ref.All is working good. The images and pdf are getting uploaded on the server with proper names and sizes.
But, now I want to check if the directory is already exists on the server or not. I am not able to get it to work with this library.
So my question is that how to check directory on ftp,if directory is there then upload the files if not then first create directory on ftp and then upload files onto that directory?
Any Ideas.. ? Any help will be appreciated.
Different FTP servers will answer the LIST request in differing ways, so there is no single answer to this question. RFC959 says on the matter:
Since the information on a file may vary widely from system
to system, this information may be hard to use automatically
in a program, but may be quite useful to a human user.
Using the CWD request to change into the directory in question, and detecting a successful response will detect the directory, however that leaves you in that directory as a potentially unrequired side effect.
For these reasons, as well as others, you may find more modern protocols such as SSH (which includes a file transfer feature) to be more useful. You may find the DLSFTPClient CocoaPod useful.
M.

Merge an existing MVC application with a new one

I am developing an MVC4 public facing website which should have a blog, I didn't want to develop one from scratch so I got a nice open source one from codeplex.
Herein lies the problem: I have to integrate this into the site I am building, I can't have a random link sending the user off to a separate blog site as I have to display sections from the blog on my original site.
I thought about using Areas which I will give a go after posting this but I was interested in knowing if there is a better way to do this or caveats that i need to be aware of etc.
Thanls for all the help :)
So I managed to do this with a bit of tinkering.
First I added the source code projects to my solution. Then I created an area called Blog and deleted all of the boilerplate stuff except BlogAreaRegistration.cs. I then looked at the References and referenced all corresponding libraries as well as the accompanying class library projects.
I copied all the folders except App_Data, Content and Scripts into Areas/Blog. Copied the previously mentioned folders to their respective locations in the root website.
I then compared both Global.asax's and web.configs, copied across the missing sections into my own files (not without the help of Examdiff for the configs).
I then had to copy the default ViewTemplates from the Areas/Blog/Views directory to the root Views Folder.
...press F5 and voila!
Ofcourse I make it sound like a disney fairytale bbut it was alot more difficult with lots of trial and error (of a yellow screen of death kind).
Well, that's my 2 cents just incase anyone else runs into the same murky waters in the future

Is it possible for a user to send me their whole app-directory for analysis purposes?

Is it possible for an non-beta user of my app to send me their whole app directory for analysis purposes?
I know the way via the Xcode Organizer to download the whole app directory. But is this also possible for a end user to save/export a package of the app including all document files and send me this package via email?
The application directory and its contents are not end-user accessible without the use of a third-party tool such as PhoneView or iExplorer.
Yes. I am sure there are many cheaper ways to do this, but I find PhoneView really handy for browsing the device and copying complete app folders.
Another approach I suppose - easier for the user but tougher for you - is to implement file sharing so that the user can drag stuff from your app via iTunes. It depends on how much / what kind of data you need from the user how you would implement this.

iOS CoreData image problems when working from a backup

We have an app that allows users to create their own content, it includes "groups" of text and images which are then used in a game. They are written to the db, but also "restored" back to documents when they are "synced" or "backed up" to an existing or "clean" device.
A user is able to backup (.fgz) to a dropbox, which is meant to make it easy to share the game data between a number of devices. This works without any problems. The game content (db driven) and images can be shared to any number of devices without any problems.
Every time we update the App, we have a problem where the text entries are retrieved and are completely viewable (both from the local file system / sqlite) but for some reason the images in the same location will not display as they have previously (the path to the image seems to be deprecated during the update). This includes doing a "backup" to a newer version of the app, to a device which has not previously had the application installed, which is also really strange.
During testing, using Xcode and local copies (replicating "install in place", we can not replicate this problem using the exact same code, and databases. There are no errors or warnings. Is this a core data problem? Any other suggestions about what we might be doing wrong?
What is going on here? We are at our ends trying to find a solution. Is there a better way to do this? We have thought about keeping our files as part of the local file system only, but if we do this, they won't be as "shareable" via the dropbox.
Any thoughts about managing image data in iOS would be very much appreciated.

Exporting files from a Javascript based phonegap app - options or ideas?

I'm currently writing a mobile app (hopefully iOS or android) using the jquery mobile framework and phonegap.
It'll need to export/send csv files in some way to the users, but I'd be interested to hear ideas or suggestions about the best way of doing so. If this can be done on the js side of the app that'd be ideal as it's what I'm most familiar with. A couple of options I've considered are:
Uploading the file using the google docs api
Writing the file to the file system (then export e.g. via iTunes)
I'm new to this so any suggestions gratefully received! Thanks for your help
There are a few options that you could use depending on how you want it to work.
The main options would be to
Use the File API (http://docs.phonegap.com/phonegap_file_file.md.html#File) to store files on the filesystem of the device.
Upload the file to a server using a standard XMLHttpRequest.
Write a native PhoneGap plugin on each platform that you are interested in that could connect to Google docs.
As Dave pointed out you can write files with the FILE API. I have used the file api on iOs to write custom log files and havent found any yikes so far.

Resources