3 October 2017 | Programming |
(Updated February 2021 for PikaJS 1.2)
Introducing PikaJS: a jQuery-like JavaScript library that simplifies the client-side scripting of HTML.
I had been using jQuery and PrototypeJS, and I needed to ditch PrototypeJS at long last.
My colleague Michael Franzl said, “Hey! Check out this Balalaika thing!”
So I did.
Unfortunately, Balalaika doesn’t give you many methods to do cool stuff. That’s left as an exercise for the programmer…
So, I decided to make my own jQuery, and PikaJS is the result!
(more…)
7 May 2017 | Computers, Programming |
If you’ve ever tried to open a text file in Windows that was not a Word Doc, you’ve no doubt been smacked in the face by the abomination known as Notepad.
Notepad is Windows’ built-in text editor. At this point, I think the program has not been changed since… forever. And it shows.
Notepad is slow, it has almost no features, and generally people just pray until they’re done doing what they need to do just so they can close down that flaming pile of garbage.
As it happens, there’s a great all-purpose text editor you can download for free, and it’s WAAAAY better than Notepad.
(more…)
11 February 2017 | Computers, Programming |
Many people use WordPress on a server for a blog, online stores, and so on.
It’s great software since it makes creating a “fancy website” accessible to those who are not so technically inclined – which is most of us!
There is a problem many people see when using WordPress that has become known as the WSOD, or White Screen of Death. Basically, one day you try to load any page on your WP site (including the admin pages), and all you get is a blank screen.
When this WSOD happens, there is 1 trick that I have found works better than any other…
(more…)
14 August 2016 | Computers, Programming |
You may have heard about “Bash on Ubuntu on Windows”. If not, you can check out my post on Bash for Windows 10.
First, you’ll need to make sure you have the Windows 10 Anniversary Update, which you’ve probably received automagically by now.
Then, you’ll need to manually install Bash on Ubuntu on Windows to get your bash prompt.
When you’re done, you’ll probably listen to Microsoft when they say “no GUI stuff!” on bash… But actually, you can set yourself up with a lovely development environment including git – and even gitk – right in Windows.
And it’s much easier than you might think…
(more…)
3 April 2016 | Computers, Programming |
This summer, Windows 10 will be 1 year old. Microsoft recently announced that they’ll be releasing another “major” update for their latest OS around this time.
Most of the new features are nothing terribly earth-shattering. Probably the most impactful change to most users will be a slight modification to the Start Menu.
For power users, however, they’ve got something rather big planned: Windows 10 will soon include the Ubuntu Linux Bash shell (probably as an optional app/download).
What in tarnation is going on here?!
(more…)
9 August 2015 | Computers, Programming |
Cookie Consent laws: you have surely seen them.
You go to a site, and you get a popup or bar at the top of the site that says, “We use cookies, blah blah blah…”
There is usually a “Learn more” link, and sometimes a way to accept or reject that site’s use of cookies.
The reason for this is a very stupid law implemented in the European Union that is supposed to protect people from… well, actually, it doesn’t protect anyone from anything. Okay, technically, it protects you from your sanity.
Especially if you use Google Adsense to put ads on your web site, you probably have received an e-mail from them telling you that you must have a Cookie Consent thingie on your site by the end of September 2015 in order to comply with yet another EU cookie law.
Right, so, how do you add cookie consent to your site – quickly and easily?
(more…)
26 May 2015 | Computers, Programming |
You have probably encountered embed codes before, but they may seem like a bit of a mystery.
An embed code is, in short, a bit of HTML that allows you to embed part of another web site on your own – like a YouTube video, for example.
Embed codes come in two general flavors these days, and each has its strengths and weaknesses.
So, how do embed codes work? Why are some hugemongous, and others teeny-tiny? Are iframe tags really the spawn of the devil?
Read on!
(more…)
20 April 2015 | Computers, Programming |
Ah, yes. Facebook and images!
You know the drill: You share a link, and you expect that an image from the page you shared will show up.
But, it doesn’t.
This is especially true if you’re sharing a link from a lesser-known site, like perhaps your own blog or online store.
Fortunately, there are a few tricks you can use to make Facebook – and other social networking sites – happy.
(more…)
1 July 2014 | Programming |
If you’ve ever programmed something in JavaScript, you most likely ran into a situation where you needed a delay.
Normally, we do this with setTimeout().
For repeatedly calling some function every X milliseconds, one would normally use setInterval().
Well, that’s fine. But what if you want to so something 10 times, and delay 3 seconds between iterations?
The solution is not as obvious as it appears…
But it is simple!
(more…)
9 February 2013 | Programming |
COO-KIES!
So, you’ve got a web server. It’s slow.
So, you optimize your app, and implement some caching. It’s faster, but not fast enough.
So, you decide to use Varnish, the popular reverse-proxy web application accelerator. It doesn’t work.
The reason it doesn’t work is that on your web site, you’ve got all kinds of Javascript-based goodies, like Google Analytics, or maybe embedded videos that set tracking cookies, or maybe things like AddThis that also set client-side cookies.
Well, client-side cookies are for the JS on your site; your application doesn’t actually care about them. BUT – and this is an annoying “but” – if those client-side cookies are set for “yourdomain.com”, then with every single request a reader makes to your server, those cookies are sent along.
And that means Varnish won’t cache anything, because it says, “Cookies?! EEK! No caching!”
So, how do you make Varnish happy with only the cookies that you want to keep?
Read on…
(more…)
Recent Comments