BlogHide Resteemsdavidpm (44)in programming • 5 years agoDisabling dangerous redis commands in Production reduxI recently read a great article from Honeybadger that muses on what could happen to a production environment if a fat fingered developer did something like: Redis.current.flushdb . This…davidpm (44)in technology • 6 years agoHeuristics on the Practice of ProgrammingA Living List What follows is a living list of heuristics I've come to internalize over the years as a developer. My goal is to periodically add to this list. Consider it a repository of…davidpm (44)in programming • 6 years agoGit Interactive Rebase to Alter CommitsDo you have skeletons in your git history? Maybe you want to re-write that history? I know I've been down that road, and since I've had to look up how to do this several times I thought it was high…davidpm (44)in technology • 6 years agoDropping Into B-treesMy recent (and only) RailsConf talk:davidpm (44)in ruby • 6 years agoCreate a command-line gem from scratch with Thor (part two)This is the last in a two-part post on creating a Ruby cli gem from scratch. Part one found here. Picking up from our last post, we want to start working on our user interface. In this case we…davidpm (44)in ruby • 6 years agoCreate a command-line gem from scratch with ThorThis is the first in a two-part post on creating a Ruby command-line gem from scratch. Part two found here. Let's write a command-line interface (cli) as a Ruby gem. We need the gem to do…davidpm (44)in blockchain • 6 years agoBlockchain Proof of ConceptIf you are a programmer and have been hearing all of the fuss about THE BLOCKCHAIN but haven't yet looked into it, and were looking for a starting point, this is the post for you! Feel free to…davidpm (44)in sql • 7 years agoSQL Cheat SheetSQL can do a lot: data insertion, querying, updating and deleting, schema creation and modification, and data access control. I have to look up this stuff more often than I'd like to admit. How do I…davidpm (44)in rails • 7 years agoBootstrap with Rails and Postgres> rails new app_name ...gives you all you need to get started developing an application, notably using SQLite as the default datastore. I've always worked with Postgresql (postgres)…davidpm (44)in ruby • 7 years agoREGEX Multiline AnchorsEver try out a regular expression on rubular , stick it in your model: MEH_REGEX = /^(?=.*[a-zA-Z])(?=.*[0-9]).{8,}$/davidpm (44)in ruby • 7 years agoRspec ConfigYou've included rspec in your Gemfile , run bundle install and you want to initialize some examples to start testing. > rails g rspec:installdavidpm (44)in rails • 7 years agoRails MIME TypesWhen using Rails to build an API you'll most likely be working with JSON or XML to pass around data. That is because most APIs today work exclusively with these MIME (Multi-purpose Internet…davidpm (44)in ruby • 7 years agoMessages with Methods in RubyYou hear it all the time when reading about Ruby: everything is an object. Objects in Ruby communicate with other objects by passing "messages" back and forth to one another. Well, those messages…davidpm (44)in linux • 7 years agoCPUsEver needed to check really quick how many CPUs your *nix machine is running? Maybe you're logged into a remote server, or maybe you just forgot. In any case, I keep finding myself in a such…