Repatriating Refugees I have created fundraisers on two sites, so you can use whichever suits you. There is a lot of information on both fundraiser sites, and I will be adding more here soon as well. Help Refugees with Hope For Tomorrow, Liberia on Crowdrise
I build things out of bits. I have accepted a new position leading Productivity and Automation at Invoice2Go starting in January 2016 in Redwood City, CA. I am thrilled to have found a role that matches perfectly with my passion for efficiency and process iteration. I am not currently considering new opportunities. For a printable version of my resume look here: http://resume.peterboling.com. My public calendar is available, so you can know when I am available.
An Email Condom for your Ruby Server sanitize_email This gem allows you to override your mail delivery settings, globally or in a local context. It is like a Ruby encrusted condom for your email server, just in case it decides to have intercourse with other servers via sundry mail protocols. Summary It’s particularly helpful when you want to prevent the delivery of email (e.g. in development/test environments) or alter the to/cc/bcc (e.g.
LISTEN for Postgresql NOTIFY messages; Asynchronously process payloads celluloid-io-pg-listener (on github) Why? At Trumaker & Co we had a distributed data problem. Two data stores that needed to be kept synchronized, in real time, with inserts and updates allowed on both sides. There wasn’t a good solution available for that, so I did a lot of research and built celluloid-io-pg-listener to solve the problem. How? The data stores are both PostgreSQL databases living in different namespaces (i.e.
Introducing a new RubyGem celluloid-io-pg-listener (on github) Allows you to asynchronously LISTEN for Postgresql NOTIFY messages and do something with the payloads. Sure! It should work if you just run bin/setup from the root directory of the gem, then you can follow along the examples in the readme. All the data about db setup and structure is located in the spec/apps directory. In spec/apps/Rakefile you will find a test_db_setup task. Check it out.
What is it? See the what is it post. Why should you use it? No migrations needed for new boolean attributes Avoids ALTER TABLE when adding a new boolean field to a model, which can be important for very large tables Only the one integer column needs to be indexed The index is actually meaningful, unlike a boolean column index Bitwise operations are fast, indexes are even faster, and you can use either one Adds scopes to easily access collections of records with specific fields Chained scopes to combine sql for different bit fields for maximum performance Provides condition builder methods for each bit field so you can construct your own custom SQL with the correct bit field values for the list.
Archive.org client I’ll put something here soon.
Gets the Rails flash object working with page cacheing. I’ll put something here soon.
For those engaged in the pillage and plunder of comma separated values. I’ll put something here soon.
Collect errors from multiple objects on a single object, especially useful with the Form Object Presenter Pattern. I’ll put something here soon.
Enhancer of Rails’ content_for system. Allows defaults, and no_content_for overrides in partials. For Rails 3, 4. Why? Keep the views dry with content_for_with_default and friends! Complete flexibility in defining defaults and overrides. Remove most or all logic from views. Allow for no content to override a default. DryViews provides extensions to ActionView::Helpers::CaptureHelper, which is part of ActionPack: * content_for_with_default * no_content_for * content_for (enhanced to play nice with the above methods) The rails rendering chain is sort of inside out so the template rendering happens first, and this is what makes it possible to override everything!
Performance Measured and Tuned Batch Processing of Records with Blocks in Rails. EachInBatches (Originally BolingForBatches) NOTE: I am resurrecting this code because I still have this recurring need, and Rail’s native batching doesn’t cut mustard. It is some of my most ancient code, and it isn’t pretty, but I hope to improve it over time. I often need to execute really large computations on really large data sets. I usually end up writing a rake task to do it, which calls methods in my models.
Bit Fields for Active Record What is a bit field? https://en.wikipedia.org/wiki/Bit_field What is a bitwise operation? https://en.wikipedia.org/wiki/Bitwise_operation flag_shih_tzu supports both :bit_operator and :in_list query modes, but only :in_list can will utilize a database index. What does it look like? class Lead < ActiveRecord::Base include FlagShihTzu has_flags 1 => :warm_up_email_sent, 2 => :follow_up_call_made, 3 => :final_email_sent, 4 => :appointment_scheduled, 5 => :not_interested, # You can specify use any integer column to use for flags!
Keep slow gems on the bench. Gemfile analysis. I’ll put something here soon.
Allows you to customize (and normalize the length of!) the text and color used to write the log level to your logs. “error” can become red and say “noo”. “info” can become white and say “meh”. “debug” can become blue and say “wat”. Or whatever you want… I’ll put something here soon.
Organize data results from raw sql queries (as with PGresult, or Dossier) intelligently. I’ll put something here soon.
An endlessly customizable development toolbar added to your website. Successor of ye olde rack-bug. I’ll put something here soon.
Rack Middleware that injects things into the response body. I’ll put something here soon.
A reference implementation of a custom React renderer for Rails. Adds benchmarking info to Rails logs for parity with Rails view rendering benchmarking. I’ll put something here soon.
Mark specs pending or skipped for specific Ruby engine (e.g. MRI or JRuby) / version combinations. I’ll put something here soon.
Provides super powers to the Rails flash object. I’ll put something here soon.
Provides content_tag_for method signature to create customizable and logic-gated labels from objects. Also includes a presenter base class to allow any Ruby web framework to create logic around HTML tags. I’ll put something here soon.
Subdomain linking and routing for Rails written by Michael Bleigh, maintained by myself. I’ll put something here soon.
I upgraded to El Capitan, with Homebrew & Ruby, and this is how I did it flawlessly. … and Xcode and Java, etc. Prepare If you don’t already have homebrew installed, do that first, so you don’t have to deal with SIP issues. Install all Software Updates available in the Apple Menu, up to and including El Capitan. Hardware After the installs and forced reboots my 27” Thunderbolt display wouldn’t display anything.
I quite envy a nice commit message. The Rails project has rules about commit messages that are tops. This is a great example from a great developer I know, which got merged into core. So now on my own projects I have cribbed, tweaked, and automated a tiny bit of of that sweet, sweet commit message honey. Naming your branch Step 1 I name my branches with a prefix that is one of: “hotfix”, “bug”, “feature”, or “candy”.
One of the most consistent warnings that has been with me through the years has been that Nokogiri was built against a version of libXML that is different than the version that is dynamically loaded. WARNING: Nokogiri was built against LibXML version 2.6.30, but has dynamically loaded 2.9.0 I had most recently, out of frustration, and due to sundry circumstances, resorted to the --use-system-libraries flag in my project’s bundler config just to get shit done.
I am relaunching my blog! I have decided to use Hugo after much internal debate, and strong lobbying from all the sleazy corporate bag-men that are constantly trying to bribe me with buzz words . I will always Ruby and use it every day, but for my blog I gotta go. So easy, static and fast! As my first post I will document how I made this work. My Architecture Local is Mac My workhorse is my heavily modified (via cover stickers) Macbook Pro.
Open Source Bash Shell Scripts bash_step Bash Step Function Library bsfl (fork) Bash Shell Function Library
Open Source Ruby - Deprecated - New maintainers apply within! remit Amazon Flexible Payment Service client. capistrano_mailer Configure automated email notifications when Capistrano tasks are run. super_exception_notifier Improvement on ye olde exception_notification plugin. Rails 1, 2, 3 only. controller_validator Use the familiar ActiveModel::Errors pattern for controller validations sequential_file Create files with sequential file names for nicer directory listing, with automatic collision detection and resolution.
SMS, Message, Facetime, or Voice 765.760.2012 Email email@example.com Want More? http://www.linkedin.com/in/peterboling https://twitter.com/galtzo https://facebook.com/peter.boling My Schedule Here is my public calendar so you know when I am available:
What is this website? It is a place for me to write about code, technology, and the future. Who am I? I am Peter Boling, of Earth. You’re still here? Checkout some of my pages!