Ask HN: How do you organize your personal code library? - rcdmd
======
peller
I use Gogs[0] to host a private git server on a subdomain of my website. It's
designed to be more or less a clone of github, so there's minimal learning
curve, and since it's written in Go (single binary) it's much more light-
weight than GitLab and very easy to get up and running.

[0] [https://github.com/gogits/gogs](https://github.com/gogits/gogs)

------
archycockroach
My method is DIY and dirty: Git project folders generally sorted by language,
in Dropbox for availability across computers. It's not perfect when I have
projects that span more than one language, so I'm open to new ideas! Do
symbolic links work in Dropbox? Backups live across a couple different pieces
of external media for resilience.

~~~
hiram112
Seems like this would be a nightmare with a lot of languages' build cycles.
Dropbox is already quite a CPU hog, and I'd imagine it'd be a nightmare to run
something like a typical Maven build that was producing all sorts of target
output that'd I not want synced. Most cloud storage apps don't make it easy to
ignore subfolders.

------
rubicon33
Github.

Github is a great place to store your reusable code. You can even choose to
include it as a submodule in future git-based projects.

------
buliam
I have recently started using code bank[1]. So far I'm really happy with it.
Before that I used Dash[2], which in my opinion was less optimal for snippets
and better suited for documentation.

[1] [http://programs.edchipman.ca/applications/code-
bank/](http://programs.edchipman.ca/applications/code-bank/)

[2] [https://kapeli.com/dash](https://kapeli.com/dash)

------
ademcan
Hi there, I am the developer of canSnippet
([https://github.com/ademcan/canSnippet](https://github.com/ademcan/canSnippet)).
canSnippet is a web application that needs to be installed on a server and can
be used to save/share code snippets. I will be back to it soon and add some
more features, and also a better theme :) Don't hesitate to ask me if you have
any question.

------
khedoros1
Most of what I've written has been for work, so I can't keep copies of that.
In my own hobby projects, there's usually so little overlap that I can't
meaningfully share much code between them. I've got a couple of classes that
have found use in more than one project, but I usually just copy those from
one project to the next, as necessary.

------
kek918
For learning, I have a directory in my Dropbox called "Programming" with a
subdir for each programming language. Then I make my test projects/tutorials
in single dirs, for instance: /Dropbox/Programming/Lua/helloworld

For other projects which may or may not develop into something bigger I put it
on Github now that my subscription offers unlimited private repos. Previously
I hosted them on Gitlab.

I like to organize the projects with Git because it'll often go months between
when working on different private projects and by looking at the Git log I
quickly see what was the last thing I worked on to get back on track.

------
ponyous
I'm having a GitLab instance on DigitalOcean, more than enough for all my
code. Probably 30+ repos in there, most of them inactive for quite a long
time.

No special organisation. Just git repos.

------
detaro
What do you mean by "code library"?

~~~
rcdmd
Code you write that may be re-used by yourself.

~~~
throwaway3301
I would also include code used by the library (say in another program/project)
or downloaded for compilation/use/reference.

------
_RPM
I use gist and github for my personal drawer of code snippets. For example, At
a time I was writing a lot of C code. I would typically look at my previous
projects to see how I've done things in order to not have to re implement my
own functions.

------
tonto
[https://github.com/dickeyxxx/gh](https://github.com/dickeyxxx/gh)

It's not great for everything but the username/projectname is pretty
ubiquitous and this just brings that to your folder layouts

------
nicky0
I write mainly Mac apps. I have an Xcode project which contains all my
"common" code. It builds to both a framework and a static library.

I include this project as a subproject in all my apps that use it.

I'n each git repository, it's a submodule.

------
kejaed
For things I'd like to have out in the open I use github.

For things I'd rather keep private I use bitbucket, who have free private
repos.

------
Grangar
Self-hosted Gitlab.

------
sklarsa
Bitbucket private repos

