RSSAmplifier

Blog

Brandon Pugh's Blog

Recent content on Brandon Pugh's Blog

brandonpugh.comRSS feed ↗26 posts

Latest posts

Indieweb Movie Club - The Castle (1997)

I watched The Castle (1997) for the April movie club… great choice Zachary Kai ! In short, I really enjoyed this film. Go watch it. I’ll admit the trailer didn’t really sell me on it but after watching the first eight minutes on YouTube , I was in. It’s about a working-class Australian family that fights to keep their beloved home from being torn down to expand an airport.…

Indieweb Movie Club - Whats Up Doc (1972)

As part of the Indieweb movie club for March , I watched the 1972 film What’s Up Doc? . I hadn’t heard of this movie before but I ended up having a lot of fun with it. If you don’t mind silly older commedies, then I definitely recommend giving this a watch. The film is billed as a screwball comedy starring Barbara Streisand and Ryan O’Neal. That’s really all you need…

Anyone can be scammed

Even Troy Hunt (a well-known security researcher and creator of Have I Been Pwned ) fell for a phishing email. He wrote all about it on his blog: A Sneaky Phish Just Grabbed my Mailchimp Mailing List I found it a valuable read, not only for the lessons learned, but it’s also a reminder that it could have happened to any of us. The email looks fairly well crafted and I appreciated his…

Git Stash Without the Branch Name

I found a way to stash changes in git without including the branch name in the stash message. This might be a very niche use case but it’s been a minor annoyance for me for some time. If you just want the alias, then add the following to your .gitconfig : [ alias ] sm = '!f() { git stash || exit 1; rev= $( git rev-parse stash@ { 0 } ) && git stash drop stash@{0} || exit 1; git stash store -m…

Tips for creating merge commits

I’ve reviewed quite a few pull requests in recent years and I’ve noticed some less-than-ideal practices when it comes to creating merge commits so I thought I’d list some things you can do to make life a little easier for someone reviewing your code. Make the commit message as useful as possible A lot has been written about how to write good commit messages , but I rarely see the…

My default apps of 2023

I saw this on Chris Coyier’s blog and thought I would jump on the bandwagon. The idea , is to see for how many things you use the default apps for your system, which for me is mostly on Android/Google. It’s a fun exercise and I totally get the arguments for “just” using default apps, but I also get a little sad at the thought of huge companies like Apple and Google able…

Blazor Best Practices Borrowed From React

Blazor took a lot of design decisions from React and other frontend frameworks and as a stateful component-based UI framework there is quite a bit of experience that can be transferred from one to the other. I gave this talk earlier this year at KCDC and then last week I presented an updated version as a Jetbrains webinar. Special thanks to Khalid for inviting me on and being an excellent host! I…

An Assortment of Productivity Tips

I recently gave a lunch-n-learn at work on productivity. This is brief a overview of the points from the talk and little tips for saving time or being more efficient while doing knowledge work. Organization vs Execution To me most productivity advice either falls under “organization” or “execution”. Organization being advice like “create task lists”,…

Git Config Settings I Always Recommend

If you’ve ever worked on a project with me then I’ve probably recommended at least one of these config settings in git. git config --global pull.rebase true - tells git to always pull with rebase instead of merge (the equivalent of pull --rebase ). This not only saves you having to type the flag every time, but also ensures gui clients will also use rebase when pulling. Note: You…

How I get things done as a tech lead

I’ve spent the past year as a technical lead for the first time in my career and there have definitely been a lot of lessons learned but in this post I want to focus on personal productivity and time management and the techniques that have helped me in this area. As an individual contributor on a dev team, decisions about what you should be working on are mostly made for you. You pick up…

My Always-Up-to-Date VS Code Setup for Web Development

I’ve gone through the setup and daily use of a number of editors over the years including most current popular ones for front end development (i.e. sublime, atom, and vs code) and for me VS code is the best choice for front end development at the moment. The team has put a lot of effort into making it a great javascript experience out of the box and it shows (VS code itself is written in…

You Should be Using Git Hooks

In my opinion Git hooks are an incredibly useful yet under-utilized feature of git. There are lots of resources that go into hooks in detail but here I’m just going to list some of the ones I find myself using over and over again. prepare-commit-msg This hooks is great for templating your commit messages. This post does a great job of highlighting some powerful possibilities. I like to use…

Use Netlify for a Poor Man's Self-Hosted Url Shortener

I recently migrated my blog from Github pages to Netlify and so far it’s been an awesome experience! Netlify gives you so much for free it almost feels like stealing! If you’re hosting some static content on github pages or S3 or somewhere, I highly recommend you check them out especially if you have a static gen build process. One of the cool features Netlify gives you is configuring…

Use npm with a proxy that requires authentication

It’s pretty easy to configure npm to connect through a proxy by setting the proxy and https-proxy config settings and you can even use npm config set which will store them in your .npmrc file. Connecting through a corporate proxy that requires authentication, however, can be a little trickier. To specify your credentials, you have to place them in the proxy url so your npm command would look…

Avoid Committing Dumb Mistakes with Git hooks

TLDR : Git hooks are an awesome way to automatically verify your code as you commit your changes I’m sure we’ve all been there where we accidentally committed a change that we were supposed to undo or wasn’t ready to be pushed and don’t realize it until the build breaks or QA finds a bug. The first step I take to avoid committing anything unintentionally is instead of just…

Bittorrent Sync - File syncing for developers

Bittorrent sync is a new file sharing app released by Bittorrent Labs. People are saying its an alternative to popular file syncing services such as Dropbox, SkyDrive, etc. However I don’t currently see it as being a true replacement for these services but after playing with for the last few weeks I must say I’m impressed and I feel it does sport some cool features I’ve long…

The Obligatory Octopress Post

I finally migrated my blog from Wordpress to Octopress and given all the blog posts I came across while getting it setup it seems almost like a rite of passage to blog about it once you’ve migrated. Why make the move?! For the hacker street cred of course. But seriously, I was growing really tired with the performance of Wordpress and dealing with shared hosting on Godaddy and my colleague…

Goals for 2013

Learn Git Git seems to be emerging as one of the most popular version control systems especially for open source projects so it would make sense to become more proficient especially given my next goal. Contribute to OSS I really want to give back and contribute to an open source project. With so many on Github hopefully learning Git will make this less intimidating. Learn a Javascript framework…

Checking if a dom element exists with JQuery [Byte sized tips]

This is a simple tip but one I feel makes my code a bit easier to read. I was never very pleased with the standard way of checking if a dom element exits in jquery: if ( $ ( '#userName' ). length !== 0 ){ //do something with $('#firstName') } The solution I like is to create a very simple jQuery plugin to encapsulate this logic: // this extension reads better when selecting elements $ . fn .…

How to use jQuery .on() instead of .live()

One of the most used features of jQuery is the easy methods it provides to to attach event handlers to dom elements like this simple example: $ ( '.submitButton' ). click ( function () { validateForm (); }); It doesn’t get much easier than that. However, a lot of times we’ll want to attach events to elements that were loaded after the initial page load such as from the result of an…

My thoughts on the Global Day of Coderetreat

Last weekend I attended the Global Day of Coderetreat in Dallas, TX which was not only my first Coderetreat but also my first time attending a developer community event and I have to say that it was a great and worthwhile experience. If you’re unfamiliar with the format of a Coderetreat you can read all about it at coderetreat.com but its basically a code kata where you spend most of the day…

Getting started with PetaPoco and Postgres

I’m currently working on a project I’ve inherited that uses a Postgres sql backend and I was looking for an easy way to make writing our data access layer less time consuming and painful. My first thought was to use a micro-ORM like Massive but while I’ve heard some really great things about Massive, I felt it might be a tough sell to my team members who aren’t too…

GhostDoc [Dev tool of the week]

Thought I would try to make it a thing where I post about a particular tool I’m using that makes life easier for me as a developer. GhostDoc is a cool little Visual Studio plugin that makes commenting your methods and properties much easier. With a keyboard shortcut or right clicking on a method name, GhostDoc will automatically generate xml documentation comments by intelligently looking at…

Allow pasting multiple lines in IE textbox

You may have noticed before that if you try to paste more than one line of text into a textbox in Internet explorer it will on only paste in the first line and disregard the rest. Firefox and Chrome on the other hand will automatically paste all lines of the text onto the one line of the textbox. This issue came up in one of the projects I’m currently working on where we wanted users to be…

VsVim [Visual Studio extension showcase]

I thought I might do an occasional series of posts on useful visual studio extensions that I use and I’m starting off with one of my must-haves: VsVim . Vim, for those of you who don’t, is a powerful command line based text editor that has been around for a long time. I had to learn it when I was a freshman at college and we had to compile our C++ programs on a central Unix server over…

My development journal

After having just watched one Rob Conery’s excellent screencasts at Tekpub on going from Coder to Developer, I’ve finally decided to start my own blog. Rob suggested possibly making it something of a development journal if you’re learning a new language or technology and being relatively new to the industry and being a lead developer, it feels like I’m learning so much so…