Category: Software Development
-
Make open source contributions a priority
I get it, you got a metric shit ton of stuff going on at work and open source contributions aren’t necessarily one of them. Bet there’s a good chance you have at least one side project though. Also bet there’s a good chance that you don’t make open source contributions…
-
How to calculate Easter Sunday in Javascript
Regardless of your religious beliefs, you are probably aware that Easter Sunday occurs on a sliding scale. This is because Easter is a moveable feast and the date is determined by a lunisolar calendar. Originally I was planning to talk about how to calculate the date of Easter in Javascript….
-
How to capitalize the first character of each word in a string in Javascript
The other day I had posted on capitalizing the first letter of a string in JavaScript. But what if you wanted to capitalize the first letter of every word? With PHP it’s just a simple call to ucwords and just as easy in Ruby and Python. To be able to…
-
Migrating from Mandrill to SparkPost
If you’re reading this then you where probably slapped by MailChimp’s latest announcement to merge Mandrill into MailChimp. You may be outraged because you were on their free tier which is going away. Personally I don’t agree with your rage. In fact, I think you’re a freeloader. That being said,…
-
Multiple buttons with Hubspot’s Vex
I’ve been implementing HubSpot’s Vex library as a replacement for stock alert(), confirm() and prompt() dialogs on SceneKids recently. In one use case, I wanted to be able to have 3 buttons on the dialog with each button returning a value, instead of just boolean true for the OK buttons….
-
How to Capitalize the First Letter in a String in JavaScript
I’m still kind of spoiled by the built-in functions in PHP (as well as Ruby and Python for this particular task). Something like capitalizing the first letter of a string is a trivial task in most languages: <?php // Capitalize first letter with PHP ucfirst(‘some string that needs the first…
-
Using an 11” MacBook Air for development
I do it, and I do it well. In fact, I’ve built an iOS game on it and used one exclusively without an external display while working at Sumo HQ in Austin, TX this past week. The 11” MacBook Air is a decent machine, even if you think the screen…
-
Tracking peak users online with Redis
This probably isn’t the best way to track things, but it’s the best I came up with. Tracking the total number of users that log in per day or month is trivial as I have discussed in a previous post. To track the peak users online at a given time…
-
Email validation via MX lookup in PHP
Validating that an email addresses ain’t what it used to be. I remember writing simple regular expressions that worked out really well. These days there are a bajillion TLDs with more being added all of the time. Something I started doing is checking that the domain of the email being…
-
Check if a string contains a character with PHP
Checking if a string contains a character could be accomplished easily with a regular expression or you can use the built-in PHP functions. To check if a string contains a character of a specific case you can use strpos. $haystack = ‘This is my haystack that we shall check’ $has_A…