Say for example I have some unused code that I want to use in the future and does not work with the rest program,or say that I come across some interesting code online. Is there any good program that I can store different pieces of code in?
Where to archive code
coding style;source code
If it's for a program which is already under source control, just keep these changes in a branch of that repo.For odd bits of code, you could use almost anything, but some good options would be private GitHub or Bitbucket repo, a Gist, or some private source-control system you maintain on your own hardware. Non-source control options might include dumping things into an S3 bucket or similar cloud storage system, esp. with your usage likely to not exceed the free pricing tier.