Skip to content

Instantly share code, notes, and snippets.

the code is like pasta, yum yum

Miłosz Sędziak Levii01

the code is like pasta, yum yum
  • Bielsko-Biała
View GitHub Profile
Levii01 /
Created Mar 16, 2022 — forked from vitorbritto/
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql
View sth_spec.rb
describe 'POST callback' do
subject(:post_callback) { post :callback, params: params }
context 'with order uuid' do
let(:params) { { orderUuid: bank_account.verification_identifier } }
let(:bank_account) { create :bank_account }
it 'bank account found' do
expect( eq 0
View gist:25e0f61d9f00f164df4f01b078e977a8
context 'when ssn is required' do
context 'empty ssn' do
let(:ssn) { '' }
it { expect(response).to have_http_status(422) }
it 'returns status 422' do
expect(response).to have_http_status(422)
View test.rb
# class SsnValidator < Grape::Validations::Validator
# module GrapeValidators
class Ssn < Grape::Validations::Base
SSN_FORMAT = /^[0-8]\d{2}-\d{2}-\d{4}$/
def validate_param!(attr_name, params)
@params = params
# return if skip_validation?
View gist:3d4d56d2893a8322eb246ad6443b54de
scope = ENV['only'].blank? ? 'all' : ENV['only']
files = %w[
scopes = []
if scope == 'all'
scopes = files
elsif scope.include?(',')
View problem.txt
has_many: :message_sets, dependent: :destroy
has_many: :sms_messages, through: :messages
has_many: :tracking_links, dependent: :destroy
has_many: :sth_associations, dependent: :destroy
View gist2.ts
import { Button } from "../general/button"
import { IInput } from "../general/iinput";
import { Widget } from "../helpers";
import { PhonePicker } from "./phone_picker"
import { BoostrapDateInput } from "../bootstrap/date";
export class WhatsappForm extends Widget {
onback: () => void
onregister: (number: string, birthdate: string) => void
View tst.json
{"address_1"=>"Ignacego Krasickiego 24",
"address_2"=>"00-401 Warszawa, Poland",
View test4.js
0: {long_name: "9", short_name: "9", types: Array(1)}
1: {long_name: "Lilac Street", short_name: "Lilac St", types: Array(1)}
2: {long_name: "Shepherd's Bush", short_name: "Shepherd's Bush", types: Array(2)}
3: {long_name: "London", short_name: "London", types: Array(1)}
4: {long_name: "Greater London", short_name: "Greater London", types: Array(2)}
5: {long_name: "England", short_name: "England", types: Array(2)}
6: {long_name: "United Kingdom", short_name: "GB", types: Array(2)}
7: {long_name: "W12 0RU", short_name: "W12 0RU", types: Array(1)}
0: {long_name: "24A", short_name: "24A", types: Array(1)}
View test3.js
0: {long_name: "24A", short_name: "24A", types: Array(1)}
1: {long_name: "Ignacego Krasickiego", short_name: "Ignacego Krasickiego", types: Array(1)}
2: {long_name: "Mokotów", short_name: "Mokotów", types: Array(3)}
3: {long_name: "Warszawa", short_name: "Warszawa", types: Array(2)}
4: {long_name: "Warszawa", short_name: "Warszawa", types: Array(2)}
5: {long_name: "mazowieckie", short_name: "mazowieckie", types: Array(2)}
6: {long_name: "Polska", short_name: "PL", types: Array(2)}
7: {long_name: "00-401", short_name: "00-401", types: Array(1)}