Skip to content

Instantly share code, notes, and snippets.

View niezbop's full-sized avatar

Paul Niezborala niezbop

  • WeWantToKnow
  • Paris
View GitHub Profile
@niezbop
niezbop / git_hamster.rb
Created June 22, 2018 13:45
Stupid script to rename git master branches to git hamster branches
# Tired of typing 'git push origin amster' because you can't avoid typos?
# Rename all your master branches to hamster branches!
# No more worrying about pesky typos!
def bad_usage
puts 'Usage ruby git_hamster.rb <PATH> [carrot|stick]'
exit -1
end
input_args = ARGV
@niezbop
niezbop / AAB_Upload_Error_07_19.md
Last active August 21, 2019 08:11
Bypassing Upload Error for .aab files on new applications for GooglePlay

Bypassing Upload Error for .aab files on new applications for GooglePlay

The issue

Overview

Soon after the introduction of Android App Bundles on GooglePlay, we switched our build pipeline from APK only to support and upload .aab files.

While this worked just fine for our existing project, we could start a new project with an Android App Bundle since we were faced with an "Upload Error (We could not save your changes. Please try again.)", and no further explanation. Trying again would lead to the same result.

@niezbop
niezbop / gist:0fb0e26b521e67a588a1d697051f470b
Created April 19, 2021 15:55 — forked from jancel/gist:1367606
Custom devise strategy
# In config/initializers/local_override.rb:
require 'devise/strategies/authenticatable'
module Devise
module Strategies
class LocalOverride < Authenticatable
def valid?
true
end
@niezbop
niezbop / calculate_damage_reduction_from_increment.rb
Created September 20, 2023 08:31
Pathfinder 2e: simulating the impact of incremental AC on damage reduction
# Results at https://docs.google.com/spreadsheets/d/1UTI_vAOxolvXNJzb4RLoP-jfdYI5wBJFph7WYs3tvxM?usp=sharing
require 'csv'
class Die
attr_accessor :size
def initialize(size)
raise ArgumentError, "Die size must be an integer" unless size.kind_of? Integer
raise ArgumentError, "Die size can't be zero" if size == 0