Skip to content

Instantly share code, notes, and snippets.

View tombruijn's full-sized avatar

Tom de Bruijn tombruijn

View GitHub Profile
/app/_build/prod/lib/elixir_package/priv/libelixir_package_extension.a(divdf3.o): In function `__divdf3':
divdf3.c:(.text.__divdf3+0x0): multiple definition of `__divdf3'
/app/_build/prod/lib/elixir_package/priv/libelixir_package_extension.a(compiler_builtins-a6b6fad6cc543169.compiler_builtins0.rcgu.o):/checkout/src/rustc/compiler_builtins_shim/../../libcompiler_builtins/src/macros.rs:253: first defined here
/app/_build/prod/lib/elixir_package/priv/libelixir_package_extension.a(divsf3.o): In function `__divsf3':
divsf3.c:(.text.__divsf3+0x0): multiple definition of `__divsf3'
/app/_build/prod/lib/elixir_package/priv/libelixir_package_extension.a(compiler_builtins-a6b6fad6cc543169.compiler_builtins0.rcgu.o):/checkout/src/rustc/compiler_builtins_shim/../../libcompiler_builtins/src/macros.rs:253: first defined here
/app/_build/prod/lib/elixir_package/priv/libelixir_package_extension.a(muldf3.o): In function `__muldf3':
muldf3.c:(.text.__muldf3+0x0): multiple definition of `__muldf3'
/app/_build/prod/lib/elixir_p

Keybase proof

I hereby claim:

  • I am tombruijn on github.
  • I am tombruijn (https://keybase.io/tombruijn) on keybase.
  • I have a public key ASAWMmghMGGNT9nCA0asFbiezsQiCiiCqDytMjE8qiTGwAo

To claim this, I am signing this object:

# Custom method to track exceptions regardless if an AppSignal transaction is
# currently active.
#
# When an AppSignal transaction is already active for this thread, it will add
# the exception to the currently active transaction. Note that only one
# exception can be added a transaction.
#
# When no AppSignal transactions are active for this thread it will create one
# temporarily, add the exception to the temporary transaction and send it to
# AppSignal.
@tombruijn
tombruijn / config_application.rb
Last active May 5, 2017 14:19
AppSignal Rails 5.1 workaround
# config/application.rb
# Workaround for making the AppSignal gem work on Rails 5.1.
# Put this after your Rails app module is defined.
# E.g. `module TestApp; class Application < Rails::Application`.
# Safest location being at the end of the `config/application.rb` file.
# Create a new middleware class with a different name so that when the original
# middleware is deleted the newly added one isn't deleted as well, since Rails
@tombruijn
tombruijn / capybara_ip_stub.rb
Created November 23, 2016 13:29
Fake an ip address on a capybara request
around do |example|
# Set custom IP address
original_app = Capybara.app
Capybara.app = lambda do |env|
Rails.application.call(env.merge("REMOTE_ADDR" => "8.8.8.8"))
end
example.run
Capybara.app = original_app
end
@tombruijn
tombruijn / appsignal gem make output
Last active September 11, 2016 13:22
Ruby gem make output rust staticlib
appsignal@0a517cf25b95:~/appsignal-ruby/ext$ ruby extconf.rb
checking for appsignal_start() in -lappsignal... yes
checking for appsignal-agent in /home/appsignal/appsignal-ruby/ext... yes
checking for appsignal.h in /home/appsignal/appsignal-ruby/ext... yes
creating Makefile
appsignal@0a517cf25b95:~/appsignal-ruby/ext$ make
compiling appsignal_extension.c
linking shared-object appsignal_extension.so
/usr/bin/ld: ./libappsignal.a(sigaction.lo): relocation R_X86_64_PC32 against protected symbol `__restore' can not be used when making a shared object
/usr/bin/ld: final link failed: Bad value
@tombruijn
tombruijn / counter-config.js
Last active March 31, 2016 07:47
Counter.js example configuration
$("#counter").counter({
autoStart: false, // true/false, default: true
duration: 5000, // milliseconds, default: 1500
countFrom: 10, // start counting at this number, default: 0
countTo: 30, // count to this number, default: 0
runOnce: true, // only run the counter once, default: false
placeholder: "?", // replace the number with this before counting,
// most useful with autoStart: false. default: undefined
easing: "easeOutCubic", // see http://gsgd.co.uk/sandbox/jquery/easing
// for all available effects, see visual examples:
@tombruijn
tombruijn / prawn-fonts.rb
Created August 31, 2013 18:59
Quick prawn setup file for font testing
require "prawn"
pdf = Prawn::Document.new do |prawn|
prawn.font_families.update("OpenSans" => {
normal: "book/assets/fonts/OpenSans-Regular.ttf",
italic: "book/assets/fonts/OpenSans-Italic.ttf",
bold: "book/assets/fonts/OpenSans-Bold.ttf",
bold_italic: "book/assets/fonts/OpenSans-BoldItalic.ttf"
})
["Helvetica", "Courier", "OpenSans"].each do |f|
@tombruijn
tombruijn / caveatPatchor.js
Last active December 14, 2015 10:18 — forked from protocool/caveatPatchor.js
Propane extension that shows avatars and full names
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
@tombruijn
tombruijn / cancan_strong_parameters.rb
Created February 21, 2013 13:54
CanCan + strong_parameters easiest hack
# From: https://github.com/ryanb/cancan/pull/757
# Here for reference
##
# Tell CanCan to use the user-controller resource_params method
# rather than its own (when the user-method) is available
module CanCan
class ControllerResource
def resource_params