6 ms·
Ask HN: How do you organize your personal code library?
- detaro 10y agoWhat do you mean by "code library"?
- rcdmd 10y agoCode you write that may be re-used by yourself.
- throwaway3301 10y agoI would also include code used by the library (say in another program/project) or downloaded for compilation/use/reference.
- deleted 10y ago[deleted]
- ponyous 10y agoI'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.
- archycockroach 10y agoMy 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 10y agoSeems 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.
- tonto 10y agohttps://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
- khedoros1 10y agoMost 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.
- peller 10y agoI 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
- rubicon33 10y agoGithub. 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.
- _RPM 10y agoI 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.
- kejaed 10y agoFor 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.
- nicky0 10y agoI 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.
- buliam 10y agoI 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 10y agoHi 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.
- Grangar 10y agoSelf-hosted Gitlab.
- kek918 10y agoFor 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.
- sklarsa 10y agoBitbucket private repos