Category: Code Tips and Tricks

The blog posts in this area are mostly notes to myself about things I’ve learned along the way and don’t want to forget, so most of these won’t be articles with long explanations! Since I’m also into helping people learn to code, though, there are a few things I want to record here that are either basics that most self-taught folks don’t seem to know (though I have seen some very creative work-arounds for some of them!) or things that are actually pretty easy but most beginners/self-taught folks might not realize are even possible. Posts written in more of a tutorial style, I’ve filed under the ‘Basics’ sub-category.

AJAX and Images

Okay so I recently figured this out, fixed it on my scripts, forgot about it, was just reminded, realized I ought to document/share. So this is getting posted here and a couple other places. When you do a fetch() or $.get() the browser only fetches that specific page, and doesn’t bring along any external/linked files…. Read More

Using SVG Filters in CSS

Firstly, you’ll need the svg itself. Three things to note: 1: Like empty images, empty svgs still take up some minimum space by default. If you’re borrowing a filter from an svg image that you’re actually using, that’s not an issue. If you’re just using the svg for filters, the svg itself needs to be… Read More

Glitch “Disk Full” Fixes

Add to .gitignore: In the Terminal: Note!! pnpm will not understand ci and will pass it to npm directly, and you will end up with locally-installed npm modules that contribute to your quota. refresh will trigger the editor refresh, pnpm to prune & install, and the app to restart.

My Favourite Text Gradients

Note: I am using -webkit prefixed styles for all three relevant rules to ensure that only browsers that implement all three will load the background gradient at all. I could use a proper polyfill and/or @supports, but honestly this creates more readable code. Non-webkit browsers have started using webkit prefixes too, so this code works… Read More

Automatically generate Google Fonts link.

Useful if you are making a customizable skin, or if you allow users to set font preferences in their account settings. Of course, the basic way you include google fonts on your page is like this: HTML (preconnects are technically optional): Or, CSS Include: So how to generate that link from an array of font… Read More

Changing the Colors of Input Elements

Ever been on a forum site with a really nice dark theme, but then you go to make a post, and are presented with a large blindingly white text area to type in? Maybe with tiny, hard to read font? Of course you have. But this is a 100% fixable problem. Let’s say we have… Read More

Data Binding, Updates, and SQLDataSource

Random Things to remember: SQLDataSource won’t bind parameters properly if you don’t specify a type, but the GUI data source setup window doesn’t guess nor prompt you to provide them. It’s under ‘Advanced’; or go into the code and add them. GridView will automatically add anything with ‘id’ in the field name to the DataKeys… Read More