Skip to content

Instantly share code, notes, and snippets.

version: "2"
services:
# Jaeger
jaeger-all-in-one:
image: jaegertracing/all-in-one:1.55.0
restart: always
ports:
- "16686:16686"
- "14268"
@arathunku
arathunku / sentry_req_http_client.ex
Last active March 13, 2024 06:05
Custom HTTP client for Sentry
# mix.exs
# {:sentry, "~> 10.2"},
# {:req, "~> 0.4.9"},
# config.exs
config :sentry, client: MyApp.SentryReqHTTPClient,
# lib/my_app/sentry_req_http_client.ex
defmodule MyApp.SentryReqHTTPClient do
@behaviour Sentry.HTTPClient
ActiveSupport.on_load(:action_controller_base) do
bc = ActiveSupport::BacktraceCleaner.new
bc.remove_silencers!
bc.add_silencer { |line| line.start_with?(RbConfig::CONFIG["rubylibdir"]) }
bc.add_silencer { |line| line =~ Regexp.union(
*(
%w{ bootsnap railties spring activesupport actionpack zeitwerk thor rack }.
map{|g| /\A#{g} \([\w.]+\) /}
),
/\Abin\/rails/

Topic: Conversation starters

  • Are you on track to meet the deadline?
  • Hey, what’s going on?
  • How are you? How is life outside of work?
  • How are your parents/grandparents? Where do they live? Do you visit them?
  • How is your family?
  • How was your weekend?
  • How’s it going?
  • If around a holiday: Do you celebrate [Holiday]? If so, can I ask what are you plans?
#!/usr/bin/env bash
file_with_methods="${1?Pass filename}"
# set -e
(
IFS='
'
for line in `rg "def (\w+)" ${file_with_methods} -r '\$1' -o --no-line-number`; do
COUNT="$(rg $line -F . | wc -l)"
if test $COUNT -gt 1; then
@arathunku
arathunku / config.ex
Created April 21, 2017 07:32 — forked from jmglov/config.ex
Elixir: override Mix config with environment variables
defmodule Config do
defmacro __using__(_) do
quote do
import unquote(__MODULE__), only: :macros
end
end
defmacro cfg(key, type \\ :string) do
quote do
defp unquote(key)() do
@arathunku
arathunku / problem.js
Last active February 4, 2016 14:26
https://youtu.be/605C8l_g5fo | After expanding the list, scrolling down and clicking on an element to close the list, the height of the ScrollView is not recalculated and there's a blank screen.
'use strict';
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View,
ScrollView,
TouchableOpacity
} from 'react-native';
@arathunku
arathunku / wat.md
Last active February 3, 2016 07:33
def self.fetch_by_tracking_code(tracking_code)
  Domain.where(tracking_code: tracking_code).take
end

gives: (no default scopes)

"SELECT "domains".* FROM "domains" WHERE 
@arathunku
arathunku / keys.md
Last active January 30, 2016 08:09
  • install xcape
  • run: xcape -e 'Shift_L=Escape;Control_L=Control_L|G;Caps_Lock=Control_L|G'

Holding SHIFT/CTRL/CAPS keys will work as usual, simple press will work as ESC(Shift)/CTRL+G(ctrl/caps)