GitHub Projects and Markdown Files

IMG-20160528-00237Reusable Code

As I am developing websites, I can’t help but find myself reusing the same code over and over. As a programmer, it is almost instinctive now that whenever there is a section of code, markup, text, anything that I have to literally copy and paste, alarm bells go off. There needs to be a better, programmatic solution for this

In terms of development on different projects, these are usually described as plugins, which are essentially little scripts that can easily be used and re-used, regardless of the website or project. Just “plug in” the script file, maybe make on or two very minor additions to the markup, and use the preconceived functionality.

Copy & Paste

I like the openness of the web. I like that if there is no apparent solution to a problem, you can go on the web, type in fragments of the problem and if not the whole solution, find enough information to come up with a solution yourself. And part of that—part of what makes web development so attractive as a whole—is that the code is technically always open source. (Sure you may try to obfuscate it, but it essentially is). I’m sure there is (lots of) code in “my” code that I took from other code, that came from somebody else’s code that came from somebody else’s code, etc.

New GitHub Projects

Long story short, I added a couple of my plugin repos to my GitHub, so that they may be available for the world and if nothing else for myself as a sort of cloud backup. In the process, I found myself learning what an .md (Markdown) file is, and that GIT supports versions (though they don’t see to want to push… maybe I’m missing something).

Right now you will find my always-used smooth anchor scroll, and also tabscroll a quick and easy jQuery tab-script that lets you set up a webpage with indexable, history-functioning, bookmarkable tabs with literally a couple of lines of code (with functioning fallback, in case Javascript is disabled). And of course it even plays nicely with the smooth anchor scroll plugin, as well!

The newest Plugin is part of a larger library I plan to release when it is ready, called Scrollanimate (maybe I’ll rename it still), which lets you do cool things in relation to the scrolling point of the page.

I branched a little part of that library—I called it saPopIn —that “pops in” certain elements into view, any element, from the bottom left or right. Checkout the updated version of the schrift.co homepage for a live and working version.

I will probably add a couple of posts detailing each plugin in a little more depth—and maybe and link to some examples—but right now, you can check out the GitHub here .

Advertisements