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
Block or report user

Report or block Levii01

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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)
end
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
binding.pry
# return if skip_validation?
View gist:3d4d56d2893a8322eb246ad6443b54de
scope = ENV['only'].blank? ? 'all' : ENV['only']
files = %w[
setup_mpc_category_and_events
create_users_roles
]
scopes = []
if scope == 'all'
scopes = files
elsif scope.include?(',')
View problem.txt
Campaign
has_many: :message_sets, dependent: :destroy
has_many: :sms_messages, through: :messages
SmsMessages
has_many: :tracking_links, dependent: :destroy
TrackingLinks
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",
"city"=>"Warszawa",
"postcode"=>"00-401",
"country"=>"Poland",
"country_code"=>"PL",
"google_review_url"=>
"https://search.google.com/local/writereview?placeid=ChIJ6WiipivNHkcRgkXIF23WuZs"}
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
place.address_components
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)}
View gist:be7e97b14babd45789df441f87c8e4c6
place.address_components
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)}
View test2.js
place.address_components
(8) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
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)}
You can’t perform that action at this time.