Skip to content

Instantly share code, notes, and snippets.

View pboling's full-sized avatar
πŸ“
Ping me if you need me!

|7eter l-|. l3oling pboling

πŸ“
Ping me if you need me!
View GitHub Profile
task :generate_engine do
# Get name sent from console
name = ENV['name'].downcase
# Store useful paths
engine_path = "engines/#{name}"
dummy_path = 'spec/dummy'
lib_files_path = 'lib/tasks/files'
dummy_relative_path = "#{engine_path}/#{dummy_path}"
@pboling
pboling / legacy.yml
Created May 16, 2023 15:04
GH Actions for Legacy Rubies
name: Legacy Ruby Support
on:
push:
branches:
- 'main'
- '*-maintenance'
- '*-dev'
- '*-stable'
tags:
@pboling
pboling / BrokenExample.md
Last active October 18, 2024 18:19
Github Markdown Light & Dark Themed Logo SVG

Change your Github Settings > Appearance > Theme (light to dark, or dark to light) and reload this page! You will note that none of these solutions work!

@pboling
pboling / ansi_highlight.rb
Created July 20, 2021 20:58
Colorized ansi_highlight
# frozen_string_literal: true
require "colorized_string"
String.class_eval do
# Adapted from the Rails highlight text helper.
# http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#method-i-highlight
#
# NOT FOR USE WITH HTML (use the Rails standard one for that)
#
@pboling
pboling / Emoji Monospace Test.md
Created March 25, 2021 23:01
Emoji Monospace Test

A markdown table that I want to be aligned; alas, it is impossible!

πŸ‘·πŸ‘·πŸ‘· πŸ“¬πŸ“¬πŸ“¬ πŸ’šπŸ’šπŸ’š 🚒🚒🚒 βœ…βœ…βœ… πŸ”€πŸ”€πŸ”€ πŸš€πŸš€πŸš€ ⬇️⬇️⬇️ πŸ’¨πŸ’¨πŸ’¨
123456 123456 123456 123456 123456 123456 123456 123456 123456

Not even an attempt to pad with other characters works because the emoji are not even a multiple of the monospaced width.

| πŸ‘·πŸ‘·πŸ‘·0 | πŸ“¬πŸ“¬πŸ“¬0 | πŸ’šπŸ’šπŸ’š0 | 🚒🚒🚒0 | βœ…βœ…βœ…0 | πŸ”€πŸ”€πŸ”€0 | πŸš€πŸš€πŸš€0 | ⬇️⬇️⬇️0 | πŸ’¨πŸ’¨πŸ’¨0 |

@pboling
pboling / rails_single_file.rb
Last active December 1, 2018 16:16 — forked from clupprich/rails_single_file.rb
Rails app w/ tests in a single file
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
@pboling
pboling / keybase.md
Last active August 20, 2018 05:56
keybase.md

Keybase proof

I hereby claim:

  • I am pboling on github.
  • I am pboling (https://keybase.io/pboling) on keybase.
  • I have a public key ASC8gzP9Mb-g0_M06lihOvgkD5uFbTrPooaUCSxRT9fIGgo

To claim this, I am signing this object:

@pboling
pboling / Gemfile
Created October 13, 2017 21:52
:github macro is slated to become secure HTTPS by default in the Bundler 2.0 release, this is a fix until then
# Fixes :github macro to be secure HTTPS.
# :github macro is slated to become secure HTTPS by default in the Bundler 2.0 release.
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name =~ /\//
"https://github.com/#{repo_name}.git"
end
@pboling
pboling / unobtrusively_logged.rb
Last active September 26, 2017 09:30
Unobtrusive Debug Logging that examines wonders of Ruby: Module < Class; include Module.new(*args); and more!
# Simpler version of what the debug_logging gem does; see https://github.com/pboling/debug_logging
#
############# THIS IS A BAUBLE
############# FOR EXAMINING SEVERAL OF THE WONDERS OF RUBY
############# TO ACCOMPLISH SOMETHING PRACTICAL
############# For a more robust implementation use the gem debug_logging itself,
############# which makes use of these same principles.
#
# Automatically log Class.method(arguments) as they are called at runtime (instance or singleton)!
#
class Foo
def calls_bar
bar + " from foo"
end
private
def bar
raise "define #{__method__} in subclasses"
end
end
class SubFooPrivateOverride < Foo