Tag: javascript

repo2site: Make a web site out of a git repo's MarkDown files

I've just finished the initial work on a script that will make a full-HTML website, driven by AJAX, out of the MarkDown (*.md) files in a git repository. It's currently geared toward GitHub, but could easily be adapted to other repository hosting services.

Check it out!

The problem I was …

Continue reading

ASP.NET/C# image resizer for responsive layouts

I will probably elaborate on this a bit further when I find some more time, but for now, this post is going to be mostly code. What I have here is a relatively simple way to generate images that are resized server-side based on the screen dimensions (note: not window …

Continue reading

jQuery visibility pseudo-selectors

To help me with a project at work, I've written two jQuery pseudo-selectors which will help determine if an element is currently in the viewport or if it has been reached during scroll. This can be incredibly powerful if you're looking to only display certain items (like a "back to …

Continue reading

SVG polyfill in pure Javascript

A designer at work pointed out this SVG polyfill as a candidate for our new production site. While I like the elegance of it, I was a bit disappointed that the author felt the need to include jQuery as a dependency simply to use its selector engine and each function …

Continue reading

Give-Me-Coins.com Condensed UserScript

Lately, my interest has been piqued by cryptocurrency. After discovering that my ATI card could produce a decent hash rate without seriously spiking my electricity bill, I got specifically interested in Litecoin. Long story short, I joined a Litecoin mining pool (Give-Me-Coins.com) and decided that I could do without …

Continue reading

Mozilla's TogetherJS in a bookmarklet

Mozilla recently introduced TogetherJS, a succession of their TowTruck service. Being that it is so similar to TowTruck, I went ahead and made a bookmarklet for it.

Drag the bookmarklet below onto your bookmarks bar, and tell your collaborators to do the same. When you're on a page you want …

Continue reading

Truck It!: Mozilla TowTruck in a bookmarklet

Mozilla Labs has this really nifty, Javascript-based collaboration utility, ~~TowTruck~~, which allows real-time web editing collaboration in the browser. It's got a lot of nifty features I won't get into in this post; sufficed to say, it's pretty frickin' sweet. What I did not find to be as frickin' sweet …

Continue reading

ascii.js: A font-based rendering engine for ASCII artwork

A long-standing and thoroughly-enjoyed hobby of mine is creating and consuming ASCII artwork (though not the kind of watered-down crap you would see in, say, an e-mail signature or a chain letter). I recently went on a wild tear after stumbling across a faithful recreation of the Amiga's Topaz 500 …

Continue reading

scrollFollow: An auto-scrolling extender for knockout.js

With the following knockout.js extender, you can tie an observable array to a scrollable HTML element. When the array is updated, the element will keep scrolling to the bottom. It's smart enough to realize if the user has scrolled up, as well, and will not interrupt them. I've found …

Continue reading

Javascript document.write alternative

When a script is loaded synchronously, its element's position in the DOM can be determined. With this information, the <script> element can act as a pivot point for inserting dynamic content. This eliminates the need for document.write, a function which wreaks havoc where AJAX is involved (and flies in …

Continue reading