webdevRefinery Forum: Web Dev on your work computer AND personal laptop? - webdevRefinery Forum

Jump to content

Think a topic deserves its own subforum?

Any topic that gets popular here will have a subforum made for it, as long as there are folks around who can answer questions! So if you think wdR is missing something, just talk about it here :)
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Rate Topic: -----

User is online Marked 

  • Group: Members
  • Posts: 111
  • Joined: 21-May 10
  • LocationChch, NZ
  • Expertise:HTML,CSS,PHP,SQL

Posted 17 July 2012 - 03:24 AM (#1)

Web Dev on your work computer AND personal laptop?


Hi guys,

I've got a bit of a dilemma. My boss bought me this nice desktop computer with multiple screens, etc. Previously I was doing work on my personal laptop and I've switched over to using the desktop for work. However, I'm only a part timer and I'm always at uni and stay away from my house bout 2 nights a week, so I can't always work.

Is it possible to set up some kind of sync between the two computers? Eg if I make a file in my htdocs folder (I use xampp) then it be there on my laptop. And similarly for databases.

Or am I stuck with copy + pasting files, importing + exporting databases? That takes waaay too long. Both computers use windows 7.

Thanks in advance,
Mark.
0


User is offline gibbonweb 

  • 兄ヨハネス
  • Group: Members
  • Posts: 2062
  • Joined: 23-June 10
  • LocationMunich(DE)
  • Expertise:HTML,CSS,PHP,Javascript,Python,SQL,Graphics

Posted 17 July 2012 - 03:29 AM (#2)

Dropbox? I don't know if they're a good idea for databases though... I've heard of people syncing their iCal databases with Dropbox (putting the db file in your dropbox and symlinking to that file at the location where the db would look for it) but I'm not sure if that would work well for more complex DBs...
0


User is offline Cyril 

  • Group: Members
  • Posts: 2544
  • Joined: 03-August 10
  • Expertise:HTML,CSS,PHP,Javascript,Graphics

Posted 17 July 2012 - 03:29 AM (#3)

Dropbox, or the like.
You could also rsync to a server using a cronjob. Didn't read the part about Windows 7.

website :: github :: twitter :: dribbble :: forrst
html, css, php, javascript, graphics
0


User is offline callumacrae 

  • {{ post.author }}
  • Group: Members
  • Posts: 2862
  • Joined: 20-January 11
  • LocationWarwickshire, England
  • Expertise:HTML,CSS,PHP,Javascript,Node.js,SQL

Posted 17 July 2012 - 04:03 AM (#4)

Git!
Front-end developer and writer
Twitter | GitHub | phpBB Contributor and Website Team Member | lynxphp
0


User is offline gibbonweb 

  • 兄ヨハネス
  • Group: Members
  • Posts: 2062
  • Joined: 23-June 10
  • LocationMunich(DE)
  • Expertise:HTML,CSS,PHP,Javascript,Python,SQL,Graphics

Posted 17 July 2012 - 04:09 AM (#5)

View Postcallumacrae, on 17 July 2012 - 04:03 AM, said:

Git!

git to sync a database file? I don't want to be the one having to merge those diffs :blink:
For everything else: git, of course.
0


User is offline callumacrae 

  • {{ post.author }}
  • Group: Members
  • Posts: 2862
  • Joined: 20-January 11
  • LocationWarwickshire, England
  • Expertise:HTML,CSS,PHP,Javascript,Node.js,SQL

Posted 17 July 2012 - 04:16 AM (#6)

Nah, Git for schemas and essential data :-)
Front-end developer and writer
Twitter | GitHub | phpBB Contributor and Website Team Member | lynxphp
0


User is offline AwesomezGuy 

  • Certified Asshole™
  • Group: Members
  • Posts: 1245
  • Joined: 08-March 10
  • LocationIreland
  • Expertise:HTML,CSS,PHP,Javascript,SQL

Posted 17 July 2012 - 06:38 AM (#7)

Grab a VPS and develop on that. Personally, one of my workflows is:

Make a quick one line bash script that syncs your local dev folder and the one on your VPS.
Link it to a certain key press (I use CMD+P).
Now as you develop, hit CMD+S, CMD+P each time you want to upload to your VPS. Now do all the testing and stuff through a web browser remotely.

Works great if you set it up right. :)
0


User is offline Lemon 

  • I have a dream...
  • Group: Members
  • Posts: 688
  • Joined: 24-February 11
  • Expertise:HTML,CSS,PHP,Javascript,Node.js,SQL

Posted 17 July 2012 - 06:41 AM (#8)

There doesn't exist one single solution that will work for all of your syncing needs, but there should be some combination that will work:

- For code, use something like Git, Dropbox, rsync etc. If you use Git, you'll have to remember to check everything in before you leave the work computer though and you'll also need some central repository if you don't keep the work computer on and accessible all of the time.

- For the database, MySQL (an other engines) have in built replication procedures that may be suitable for you. Trying to copy the database files themselves is definitely not a good idea unless you shut down the server first and ensure you have the same version of the database server running on each end. Another alternative is to run your database on an external server that is accessible to both your work computer and laptop.

For all of these, you'll probably want your work computer to be accessible from outside your company's network (via static IP or dynamic DNS), but you should definitely check with whoever manages the network before you try punching holes in the firewall.
Posted Image
In the end, it's not the years in your life that count. It's the life in your years
0


User is offline markbrown4 

  • Group: Members
  • Posts: 388
  • Joined: 17-May 10
  • LocationMelbourne, Austraila
  • Expertise:HTML,CSS,Javascript,Ruby on Rails,Graphics

Posted 17 July 2012 - 06:48 AM (#9)

I prefer working on one machine for the reasons you've outlined.
If your laptop is good and it has everything you need just let someone else use your desktop.
0


User is offline NeilHanlon 

  • Group: Members
  • Posts: 884
  • Joined: 08-July 10
  • LocationRowley, Massachusetts
  • Expertise:HTML,CSS,PHP,Java,Graphics

Posted 17 July 2012 - 06:54 AM (#10)

I use git and a migration script (with dbForge).
Thanks,
兄ニール

Website | Blog | @NeilHanlon | About.Me | Facebook | LinkedIn
0


User is offline Ruku 

  • I do Linux and that Internet thing.
  • Group: Members
  • Posts: 1351
  • Joined: 17-April 10
  • Location/root
  • Expertise:HTML,CSS,PHP,Javascript,Python,SQL

Posted 17 July 2012 - 09:35 AM (#11)

View PostMarked, on 17 July 2012 - 03:24 AM, said:

Is it possible to set up some kind of sync between the two computers? Eg if I make a file in my htdocs folder (I use xampp) then it be there on my laptop. And similarly for databases.

Git, or a similar distributed source code management system like Mercurial, will certainly allow you to synchronise your files with a lot more ease than anything else. Because it's distributed, you don't need a central repository if one doesn't already exist, and you can easily sync your code between your machines with an SSH session. Cygwin and Git Bash may be of use here, since you mentioned you're using a Windows system (unlucky ;)).

View PostCyril, on 17 July 2012 - 03:29 AM, said:

Dropbox, or the like.
You could also rsync to a server using a cronjob. Didn't read the part about Windows 7.

Rsync is still an option, but this isn't what it's designed for. It doesn't have any coherent means of merging changes between two different versions of a file, and doing it on a cron job will probably overwrite your changes in the files you're working with. This would certainly make for some interesting debugging sessions ;)


View Postgibbonweb, on 17 July 2012 - 04:09 AM, said:

git to sync a database file? I don't want to be the one having to merge those diffs :blink:
For everything else: git, of course.

For our PHP projects where the applications' database management tools are useless, we've been using a tool called Flyway which essentially allows you to version pure SQL files. It's relatively simple (best suited to Java projects, but with a few modifications it works perfectly with our build scripts), but it allows us to diff pure SQL dumps. If you've ever worked with XMLDB in Moodle, you'll understand why it's the lesser evil ;)
0


User is offline TheEmpty 

  • I say words in sequences.
  • Group: Members
  • Posts: 5154
  • Joined: 02-October 10
  • Expertise:HTML,CSS,PHP,Java,Javascript,Python,Ruby on Rails,SQL

Posted 17 July 2012 - 09:36 AM (#12)

Dropbox :) I actually use got though. I just don't work on the same branch or feature on the two computers.
Reserved.
0


User is offline TheMaster 

  • *-c0de master-*
  • Group: Members
  • Posts: 748
  • Joined: 24-May 10
  • LocationAustralia
  • Expertise:HTML,CSS,PHP,Java

Posted 17 July 2012 - 05:01 PM (#13)

I normally use Dropbox.

Just set the htdocs folder on both computers, to a folder inside Dropbox.

Instantly, you have synced both computers, and have a cloud backup for all your work.....why are you still here?! :P
0


User is online Marked 

  • Group: Members
  • Posts: 111
  • Joined: 21-May 10
  • LocationChch, NZ
  • Expertise:HTML,CSS,PHP,SQL

Posted 17 July 2012 - 10:01 PM (#14)

Oh wow that's cool.. I've got dropbox working to sync both the files and database files using this tutorial http://kav.in/comple...-using-dropbox/

So when I get home I should just be able to start sync and switch to the desktop and its all ready to go :) Now I've just gotta try and earn some more space. I don't think 2GB will last long :D

Thanks for the help!
0


User is offline TheMaster 

  • *-c0de master-*
  • Group: Members
  • Posts: 748
  • Joined: 24-May 10
  • LocationAustralia
  • Expertise:HTML,CSS,PHP,Java

Posted 18 July 2012 - 01:25 AM (#15)

If you want more space and have an iPhone. Tell it to sync all your files with Dropbox (plug in your iPhone with dropbox running, and a message will appear asking your permission).

They will give you 3 GB more free, just for enabling it. You can turn it off any time you want too!
0


User is offline Sephern 

  • Group: Moderators
  • Posts: 967
  • Joined: 04-June 10
  • LocationReading, UK
  • Expertise:HTML,CSS,PHP,Javascript,Python

Posted 18 July 2012 - 01:32 AM (#16)

You can also get more space by inviting new users to dropbox.

An alternative would be Skydrive - new users get 7gb.
0


User is offline TheMaster 

  • *-c0de master-*
  • Group: Members
  • Posts: 748
  • Joined: 24-May 10
  • LocationAustralia
  • Expertise:HTML,CSS,PHP,Java

Posted 18 July 2012 - 02:14 AM (#17)

View PostSephern, on 18 July 2012 - 01:32 AM, said:

You can also get more space by inviting new users to dropbox.

An alternative would be Skydrive - new users get 7gb.


The reason I didn't go with them was because of the limit of 50MB per file. Yeah, that's pretty big for most things, but ... yeah.

Thinking about it again, 50MB is actually more than enough for cloud storage :P (unless you want to upload videos, which I wouldn't...)
0


User is online Marked 

  • Group: Members
  • Posts: 111
  • Joined: 21-May 10
  • LocationChch, NZ
  • Expertise:HTML,CSS,PHP,SQL

Posted 18 July 2012 - 03:47 AM (#18)

Yeah I'm already going through all the list of the stuff to get all the free bandwidth :P I'm nearly on 4gb. I have a website also so I'll try and score some referrals from my users.
0


User is offline Hyde 

  • Group: Members
  • Posts: 1562
  • Joined: 08-March 10

Posted 18 July 2012 - 05:05 AM (#19)

View PostTheMaster, on 18 July 2012 - 01:25 AM, said:

If you want more space and have an iPhone. Tell it to sync all your files with Dropbox (plug in your iPhone with dropbox running, and a message will appear asking your permission).

They will give you 3 GB more free, just for enabling it. You can turn it off any time you want too!

No, they don't give you 3 GB right away, even less "just for enabling it". They give you a few hundreds MB each time you upload your pictures, to a maximum of 3 GB.
Hyde | HTML & CSS | PHP & SQL | Objective-C | Java | Basic JavaScript
0


User is offline TheMaster 

  • *-c0de master-*
  • Group: Members
  • Posts: 748
  • Joined: 24-May 10
  • LocationAustralia
  • Expertise:HTML,CSS,PHP,Java

Posted 18 July 2012 - 05:45 PM (#20)

Oh really? Well I uploaded all my pictures then deleted them :P
0


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users


Enter your sign in name and password


Sign in options
  Or sign in with these services