Sorting an array of objects by a property value in javascript
Sorting using sort() Lets say that you have an array of objects that you wanted to sort by: You can use the sort() method of the Array that…
Sorting an array of objects by a property value in javascript
Sorting using sort() Lets say that you have an array of objects that you wanted to sort by: You can use the sort() method of the Array that…
How to extend types in Typescript
Use an interface (Typescript 2.2+) We can extend types in Typescript by using the extends keyword For example we can write: Use an…
Fixing the error 0xe800400c or (-48) when syncing to Itunes
Imagine how disappointed I was when I had plugged in my brand new iPad 2 and only to realize that it simply cannot sync with my iTunes. If…
Case-insensitive replaceAll in Java
The replaceAll function in the java.lang.String class replaces each substring found in that matches the regular expression to replace. Would…
BooleanInput not saving in React-Admin
So I was having an issue in react-admin where the value of BooleanInput (e.g. a checkbox slider) was not saving to my backend. Specifically…
Fixing Foundation 5’s Unrecognized Expression Syntax Error
I was working on a new marketplace theme in Magento, and I kept getting a peculiar javascript error message. The exact error message that…
Installing Ruby on Rails 3 in Windows
So last week I got a little tired of having to reboot my computer to dual-boot in a linux environment so that I could work on Rails stuff…
No more updates to Google Notebook
One of the only Google app (apart from Gmail) that I use the most Google Notebook will have no more updates. Before I signed up to Google I…
Fixing Netlify form problems in Gatsby
After having a ton of issues getting Netlify’s form submission to work, I have some tips on how to get it working if you’re running into any…
How to check if a jquery plugin is installed or available
Most Jquery plugins act a lot like functions. They are attached to the main Jquery object, so essentially all we have to do is check that…
How to read remote files using PHP
When I was implementing pingback functionality in my custom blogging software, I needed to read files from a remote server. As long as allow…
Remove Anchors from a Url in Javascript
Here is something useful that I discovered in my programming for my personal websites. I needed to strip out the anchor portion of a link…
How to do it Now you could use something like react-sticky to do something like this, but it’s so much easier to just define your sidebar…
Strip Whitespace on save with Aptana
So recently I had a coworker get slightly annoyed with me and my trailing whitespaces at the end of lines. I’m using Aptana and not anything…
Using Jquery to disable the enter key
There are times that you do not want a form to automatically submit when a user hits the enter key. Or if you want to do some validation via…
Adding a delay to JQuery Functions
Recently I was working on a few functions that I didn’t want to have activated immediately after hovered over a div. I neededthe functions…
Fixing Polyglot.transformPhrase expects argument #1 to be string in react-admin
What does transformPhrase even mean? So sometimes when I’m trying to save a form in react-admin I see this really annoying error: Uncaught…
How to install Paperclip in Rails 3
Paperclip is a plugin/gem created by the talented folks at ThoughtBot. It will make using attachments and uploads in your rails application…
Removing empty elements from an array
When dealing with tag inputs from users, I find myself having to make sure they they don’t enter in any blank or empty tags. Then I realized…
Well, this is the start to my blog. Hopefully I’ll post here often, but hopefully with something useful each time. I just don’t want to have…