Category: Development
-
Copy to Clipboard in Google Chrome Console
When developing for the web, sometimes I want to JSONify an object to throw into Sublime Text for an easier look or maybe to compare two separate objects. While it’s easy to log an object in Google Chrome, the issue I have is easily getting that from the console to Sublime Text. After doing a…
-
Update Backbone Model with No Change Events
I recently needed to update an array of models to add a “reflowed” attribute to a comment which would act as a flag to show that the comment had been reordered. Doing it Wrong When I was working through this issue, the first thing that came to mind was that I could update the model…
-
Get Most Visible Element on a Web Page
Recently, I was working on updating keyboard shortcuts for o2 and came across a unique shortcut. When pressing r, we wanted to open the reply box for the most visible post. When I first started thinking about this requirement, I found myself thinking: “How the hell can I determine what the most visible post is?”…
-
Parse RSS in ExactTarget
I was recently tasked with migrating a few themes from Mailchimp to Exact Target. While the overall experience I had working with ExactTarget was much less than stellar, I most disliked working with RSS feeds. The whole process of parsing an RSS feed seemed awkward. So, in an effort to help others, and because I…
-
Github Two-Factor Authentication Failed For HTTPS
About two months ago I first switched to GitHub’s two-factor authentication. Later that day, when I went to push for the first, I had an authentication error and my push failed. I didn’t want to mess with the configuration that day, so I decided to turn off two-factor authentication on GitHub. Another Go at Two-Factor…
-
Regular Expression Example: Wrapping the Second through Last Words in a Span Element
For the past week, I have been working on a website for an emergency medical services association. To fit the client’s wishes, the design called for the first word in titles to be blue followed by all other words being red. I do not know a way to do this with just HTML, so I…
-
Remove Files from Git After Adding/Updating .Gitignore
I recently inherited a project from a beginning developer. After inheriting the project I realized that, while the developer was using Git to source control the project, the developer had completely forgot to add a .gitignore. This meant that I now needed to add a .gitignore file as well as remove files from git that were…
-
Remove .sass-cache and node_modules from Sublime Text
I’ve recently been playing with Foundation, Sass, and Grunt. And while each of these are powerful tools in their own right, they are quick to clutter up a project. Grunt creates a node_modules directory while Sass creates a .sass-cache directory. But don’t worry, because lucky users of Sublime Text have a simple fix. Add .sass-cache…