How do I programmatically locate my Dropbox folder using C#?

UPDATED SOLUTION Dropbox now provides an info.json file as stated here: https://www.dropbox.com/en/help/4584 If you don’t want to deal with parsing the JSON, you can simply use the following solution: var infoPath = @”Dropbox\info.json”; var jsonPath = Path.Combine(Environment.GetEnvironmentVariable(“LocalAppData”), infoPath); if (!File.Exists(jsonPath)) jsonPath = Path.Combine(Environment.GetEnvironmentVariable(“AppData”), infoPath); if (!File.Exists(jsonPath)) throw new Exception(“Dropbox could not be found!”); var dropboxPath … Read more

How to back up private branches in git

I use the –mirror option and push to a personal backup repository: Add it as a remote: git remote add bak server:/path/to/backup/repo Do the backup: git push –mirror bak This will automatically make your backup repository look like your active one — branches will be created, deleted, updated (even forced/non-fastforwards) as needed. You can make … Read more

How Do I Sync My Sublime Text 3 Settings Using Dropbox?

I’ve been syncing my Sublime settings for a while between multiple locations, all running OS X. I’ve had some minor problems. Finally, I decided to look into it which led me to what I would consider the authoritative description of how to sync Sublime setting between multiple machines using Dropbox: Sublime Package Control > Docs … Read more

AVPlayer “freezes” the app at the start of buffering an audio stream

Don’t use playerItemWithURL it’s sync. When you receive the response with the url try this: AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:url options:nil]; NSArray *keys = @[@”playable”]; [asset loadValuesAsynchronouslyForKeys:keys completionHandler:^() { [self.player insertItem:[AVPlayerItem playerItemWithAsset:asset] afterItem:nil]; }];

Mercurial (and, I guess Git) with Dropbox: any drawbacks?

I’d advise against it for the reasons stated above, but more strenuously stated. Both mercurial and git have their own protocols for moving changesets between repositories. These protocols are optimized/built for: efficiency consistency (never can you pull from a repo in a half-updated state) hooks/triggers — doing things on push/pull including quality (no tabs allowed, … Read more