Skip to content

Instantly share code, notes, and snippets.

View debborafernandess's full-sized avatar

Débora Fernandes debborafernandess

View GitHub Profile
@debborafernandess
debborafernandess / secure_payment_method_flyout_centered_text.md
Last active February 19, 2025 15:42
Why is Secure Payment Method Flyout Centered?

Secure Payment Method Flyout - Centered Text???

https://runway.powerhrg.com/backlog_items/INC-2579

At some point in the begining of February, the styling on the Add Credit Card/ACH flyouts changed. The input labels are now centered rather than left aligned.

Seems to be inheriting from the Install Schedule potentially on quick initial investigation.

Why is the Secure Payment Flyout styling changing?

@debborafernandess
debborafernandess / lock_orientation_to_portrait.md
Last active February 14, 2025 15:23
Lock Orientation to Portrait Mode

Improve UX by locking orientation to Portrait Mode

The page should be locked to Portrait mode regardless of the device orientation, so users know this page is meant to be used in portrait mode. Actually, the payment informations, who can be read, edited or deleted, are hidden on small/medium mobile devices when its orientation is landscape, once that the footer is sticked and is displaied in front of it.

How-to

We had two options to try to achieve this goal:

  1. Actually lock screen orientation (Javascript)
@debborafernandess
debborafernandess / headset_bluetooth_linux.md
Last active January 6, 2023 15:14
Conectar headset bluetooth no Linux

Configurar a conexão bluetooth

O que fazer quando um headseat não é listado para conexão bluetooth no Linux.

Instalar pacotes adicionais

  1. Instale os pacotes bluetooth, bluez, bluez-tools e rfkill via terminal:
sudo apt-get install bluetooth bluez bluez-tools rfkill -y
@debborafernandess
debborafernandess / Kotlin Date Iterator.md
Last active January 6, 2023 17:13 — forked from elye/Kotlin Date Iterator
Kotlin Date Iterator
class TestingClass {
    fun testingFunction() {
        for (everyday in this year 2017) {
            // Do something with everyday
            println(everyday.toString())
        }
    }

    private infix fun year(year: Int): DateRange {
@debborafernandess
debborafernandess / vim-heroku.sh
Created December 17, 2020 16:38 — forked from dvdbng/vim-heroku.sh
Run vim in heroku updated 2017
mkdir ~/vim
cd ~/vim
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim
# Compiled on Jul 20 2017
curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz
export VIMRUNTIME="$HOME/vim/runtime"
export PATH="$HOME/vim:$PATH"
cd -
@debborafernandess
debborafernandess / bulk_lancar_plano_nos.rb
Created July 24, 2019 21:23
Lançar plano para um array de clientes, para chama-los de volta à unidade
people = [Person.where(id: [3, 4])]
plan = Plan.find(18)
people.each do |person|
purchase = person.purchases.last.dup
purchase.microgym = 'nos'
purchase.description = 'Chamar quem se inscreveu e nunca compareceu'
purchase.plan_id = plan.id
purchase.save
end
@debborafernandess
debborafernandess / microgym_cancelled_data.rb
Created April 30, 2019 23:22
Analise do comportamento dos clientes que cancelaram Plano Recorrente em 2019
file = File.open('/tmp/cancel.csv', 'w')
file << "Mes de cancelamento, cliente, Modalidade, Unidade, Compras apos cancelar, Ultimo Plano comprado, Mes da ultima compra"
cancelled = Purchase.cancelled.recurrency.distinct(:person_id).joins(:plan).where("cancelled >= ?", Date.current.beginning_of_year)
cancelled.find_each do |purchase|
person = purchase.person
if person.purchases.where("created_at > ?", purchase.cancelled).exists?
new_purchases = person.purchases.where("created_at >= ?", purchase.cancelled)
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 8 columns, instead of 2 in line 9.
ORM-Adapter,Operation benchmark,User CPU time,System CPU time,Total CPU time,Real time,Memory used in kb,Transaction or Not
sequel-mysql,Model Object Creation: 1600 objects,0.536818,0.080193,0.639675,1.156077,6072,No Transaction
activerecord-mysql,Model Object Creation: 1600 objects,0.986834,0.051411,1.058469,1.481707,2436,No Transaction
sequel-mysql,Model Object Creation: 1600 objects,0.375353,0.043466,0.440293,0.640171,264,Transaction
activerecord-mysql,Model Object Creation: 1600 objects,0.638790,0.014195,0.675404,0.780479,0,Transaction
sequel-mysql,Model Object Select: 3200 objects 32 times,0.125732,0.000409,0.145452,0.182796,0,No Transaction
activerecord-mysql,Model Object Select: 3200 objects 32 times,0.841494,0.004042,0.865443,0.903764,5016,No Transaction
sequel-mysql,Model Object Select: 3200 objects 32 times,0.132256,0.000000,0.152481,0.190061,0,Transaction
activerecord-mysql,Model Object Select: 3200 objects 32 times,0.844372,0.003153,0.866892,0.905380,0,Transaction
sequel-mysql,Model Object Select
@debborafernandess
debborafernandess / install-gm-w-librvg.sh
Created January 5, 2018 17:13 — forked from tavinus/install-gm-w-librvg.sh
Installs ImageMagick --with-librsvg on Amazon Linux
# With this I was able to successfuly install everything
# on a x86 (32-bit) instance of Amazon Linux.
#
# You should probably not run this script
# It is a much better idea to use this as an Install guide
# Just follow it down, use your tab and be happy
export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/lib/pkgconfig
export PATH=/usr/bin:$PATH
export LDFLAGS=-L/usr/lib64:/usr/lib
Steps:
- Na AWS, na instancia do `RDS DB`, ver o DNS da instância do banco
- Pegar no `database.yml` o user e password do banco da aplicação
- Rodar o comando `mysqldump -u user -h 'DNS_DA_INSTANCIA_DO_BANCO' DATABASE -p > dump.sql
- Informar a senha da aplicação quando for exigida a senha do banco.