Live data from Hacker News

ShowHN: GetURL - A CLI tool to get a public link for any file

github.com

11–20 of 53 posts

Re: ShowHN: GetURL - A CLI tool to get a public link for any file

#13
Since I have web hosting and use GitHub, here's my method:

    cp file_name ~/Projects/2012/ajf.me/ajf.me/imagedump/ && cd ~/Projects/2012/ajf.me/ajf.me/ && git add imagedump && git commit -m 'new file' && cd .. && ./update.sh
Elaborate, sure, but it does the job. update.sh runs git push and then does an SSH into my server and a git pull. (Because I'm too lazy to actually set up git on my own server)

Re: ShowHN: GetURL - A CLI tool to get a public link for any file

#15
post #2

Something I threw together over the weekend. I've been using filepicker on a website of mine. Realized that I could hack it to upload and share files in a simple tool. Inspired by cloudApp, when I found myself wanting a command line version.

Well done! Also you deserve a big thanks from Filepicker.io - this is great inbound marketing for them.

Re: ShowHN: GetURL - A CLI tool to get a public link for any file

#20

Since I have web hosting and use GitHub, here's my method: cp file_name ~/Projects/2012/ajf.me/ajf.me/imagedump/ && cd ~/Projects/2012/ajf.me/ajf.me/ && git add imagedump && git commit -m 'new file' && cd .. && ./update.sh Elaborate, sure, but it does the job. update.sh runs git push and then does an SSH into my server and a git pull. (Because I'm too lazy to actually set up git on my own server)

Setting up your own git server is pretty easy, in fact, trivial with ssh + authorized_keys

I could refer you to any tutorial, but I am feeling lazy too, so here, an easy guide:

-- On the server --

1. create an account, call it "git", or "dog"

2. disable shell access for that account in /etc/passwd

   - /bin/false
3. enter that account, and set up a bare git repo:

   - mkdir myrepo.git

   - git init --bare myrepo.git
4. add your public key(s) to ~/.ssh/authorized_keys on "git" or "dog" account

-- On your client(s) --

1. Clone the repo

   - git clone git@your_server:myrepo.git

   - dog@...
Ready to go. You can even use git hooks to automate the pull.
Post reply on HN