4 ms·
FFS, it's like you whippersnappers have never heard of rsync or makefiles. Dropbox requires the mouse, and therefore means that you should get off my lawn. Se
by sneak 15y ago
FFS, it's like you whippersnappers have never heard of rsync or makefiles. Dropbox requires the mouse, and therefore means that you should get off my lawn.
Seriously though, a Makefile in your web directory with a default target that rsyncs your content up to your webserver via ssh solves this problem much more elegantly, without relying on a third party service. Bonus points for you if you render/minify your sass/scss and/or coffeescript as a target dependency.
PS: Put your remote username and remote port (if custom) for a given host in your ~/.ssh/config file, along with any necessary 'ProxyCommand's to allow direct "rsync ./ $hostname:public_html/" or such in your makefile.
- sthulbourn 15y agoI wrote that exact script earlier, except I used Rake.
- sneak 15y agoWhy are there no pirates in asia? They're all already too busy frying the pranes.
- masklinn 15y ago> Bonus points for you if you render/minify your sass/scss and/or coffeescript as a target dependency. And compile markdown files to static HTML to be served directly on the target machine.
- jerrya 15y agoUsing dropbox is problematic for security reasons, but Joe's solution offers a benefit (over rsync, etc.) he doesn't mention in his post, which is that it places his blog source in the cloud as well, and makes it amenable to editing from virtually any desktop/laptop/android/iphone/ipad out there. I suspect it's easier to go to a new client and set up dropbox on it and link it in, than it is to set up rsync and any necessary keys or firewall holes or if you are using windows, the cygwin system to support rsync. There's a lot to be said about simplicity and ubiquity, especially if it's to encourage making a blog post, and not discourage it. That said, using dropbox for this is terribly problematic in terms of security.
- joehewitt 15y agoWhat security problems do you foresee? As I outlined in my post, I created a dedicated Dropbox account for the blog and it only synchronizes files meant for the blog. If those became public it wouldn't be a problem.
- jerrya 15y agoI'm referring to the known (and still not fixed?) issues with dropbox, including logging out having no real effect on disabling access to the dropbox files. Or someone being able to steal the dropbox keys from one computer and reuse them on a different computer. In addition, as I'm sure you recognize, this reduces breaking into your hardened box and filling it with unicorn pr0n to swiping your friend's laptop while she is in the loo at the Starbucks. So someone can steal the key to your server with a few minutes access to your home computers or laptops and you will not know until you have unicorn pron all over your blog. This may be fine, and I mean that, for a personal blog (that also has regular backups.) I wouldn't set this up for clients (as suggested by others) to make it easier for them to blog, I think I would find a different solution for them. Don't get me wrong. For my own personal needs, I think your solution is better than say, posterous which seems to be going downhill fast. I like the idea of easily, quickly, blogging within emacs.
- rian 15y agohey jerrya, this is fixed in the beta version available here: http://forums.dropbox.com/topic.php?id=44811 http://forums.dropbox.com/topic.php?id=44811. it's awesome.
- teach 15y agoWhen I install Dropbox on a new machine, I can use selective sync to decide which folders are kept in sync on that machine. You can configure selective sync in CLI mode using 'dropbox exclude <path>'. (Unfortunately, I don't think there's a whitelist option.) Is there a reason this wouldn't work for your use case?
- 15y ago
- admp 15y agoBesides being better suited to non-technical users (as joehewitt points out on this very thread), it also has an advantage of running in the background, i.e. you don't have to remember to run anything. Also, there's this webapp called http://droppages.com/ http://droppages.com/ which makes publishing from DropBox even easier. Though personally, if I had to help a non-technical friend with setting up a blog, I'd just send him to Wordpress.com.
- procrasturbate 15y agoGNOME can actually mount remote folders on startup / on demand using SSH/SCP/FTP/whatever. I had a relatively non-technical friend go for this approach and it worked really well. It's actually a really kickass feature
- teach 15y agoI agree with every aspect of your comment except one: Dropbox does not require the mouse. I've been very happily running it on my headless web server for over a year. There's a CLI installer, and you can do things using the 'dropbox' command-line utility.
- justinhj 15y agoIsn't make overkill? You just need a shell script with an rsync one liner
- inportb 15y agoYeah, Dropbox does not require mice. One of my Dropbox-hosted sites† gets updated automatically a few times daily, using a cron job. † http://cmtorrent.inportb.com/ http://cmtorrent.inportb.com/
- ra 15y agoI like the sound of that. Care to share a makefile?
- martian 15y agoEasy to minify with Google Closure in a Makefile, all you need is curl: build/project_min.js: build/project.js rm -f $@ curl -s --data-urlencode 'js_code@build/project.js' --data-urlencode 'output_format=text' --data-urlencode 'output_info=compiled_code' http://closure-compiler.appspot.com/compile >> $@ h/t @enaeseth, edited for formatting