Skip to content

Instantly share code, notes, and snippets.

View gen1321's full-sized avatar
🏠
Working from home

Boris Beginin gen1321

🏠
Working from home
View GitHub Profile
<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_c0d15019-1a51-4006-aef7-7d906973799a" entityID="brand-portal">
<md:SPSSODescriptor AuthnRequestsSigned="false" WantAssertionsSigned="false" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
<md:NameIDFormat>
urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
</md:NameIDFormat>
<md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://brand.kaspersky.com/users/auth/saml/callback" index="0" isDefault="true"/>
<md:AttributeConsumingService index="1" isDefault="true">
<md:ServiceName xml:lang="en">Required attributes</md:ServiceName>
<md:RequestedAttribute FriendlyName="Email address" Name="email" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic" isRequired="false"/>
<md:RequestedAttribute FriendlyName="Full name" Name="name" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic" isRequired="false"/>
defmodule MyAppWeb.SubscriptionTest do
use MyAppWeb.SubscriptionCase
@mutation """
mutation createUser($email: String, $name: String){
createUser(email: $email, name: $name){
email
}
}
"""
defmodule MyAppWeb.SubscriptionCase do
use ExUnit.CaseTemplate
using do
quote do
@endpoint MyAppWeb.Endpoint
use Anise
use Anise.SubscriptionCase,
schema: MyAppWeb.Schema,
socket: MyAppWeb.UserSocket
end
@gen1321
gen1321 / users-export.rb
Created January 26, 2018 17:05 — forked from siraz-provectus/send file
users-export.rb
module Exports
class UserExcelExport < ApplicationExcelExport
BATCH_SIZE = 500
private
def default_headers
{
name: "Имя",
email: 'email',
resp = AmzLookUp.item_lookup(
[1] pry(main)* query: {
[1] pry(main)* 'ItemId' => 'B00SX05RCU',
[1] pry(main)* 'Condition' => 'All',
[1] pry(main)* 'ResponseGroup' => 'OfferFull',
[1] pry(main)* 'MerchantId'=> 'All'
[1] pry(main)* }
[1] pry(main)* ).to_h
=> {"ItemLookupResponse"=>
{"OperationRequest"=>
self.top = bsr * 100 / category.products_on_sale_count
[27] pry(main)> >> AmzLookUp.item_lookup(query:{'ItemId' => 'B000CST01A' , 'ResponseGroup' => 'Large'}).to_h["ItemLookupResponse"]["Items"]["Item"]["SalesRank"]
eGroup' => 'Large'}).to_h["ItemLookupResponse"]["Items"]["Item"]["SalesRank"]
=> nil
pry(main)> >> AmzLookUp.item_lookup(query:{'ItemId' => 'B0014XOS64' , 'ResponseGroup' => 'Large'}).to_h["ItemLookupResponse"]["Items"]["Item"]["SalesRank"]
eGroup' => 'Large'}).to_h["ItemLookupResponse"]["Items"]["Item"]["SalesRank"]
=> "730"
>> AmzLookUp.item_lookup(query:{'ItemId' => 'B000CST01A' , 'ResponseGroup' => 'OfferFull'}).to_h["ItemLookupResponse"]["Items"]["Item"]
eGroup' => 'OfferFull'}).to_h["ItemLookupResponse"]["Items"]["Item"]
=> {"ASIN"=>"B000CST01A",
"OfferSummary"=>
{"LowestNewPrice"=>{"FormattedPrice"=>"Too low to display"},
"LowestUsedPrice"=>
{"Amount"=>"1515", "CurrencyCode"=>"USD", "FormattedPrice"=>"$15.15"},
"TotalNew"=>"24",
"TotalUsed"=>"1",
"TotalCollectible"=>"0",
pry(main)> >> AmzLookUp.item_lookup(query:{'ItemId' => 'B000CST01A' , 'ResponseGroup' => 'OfferFull'}).to_h["ItemLookupResponse"]["Items"]["Item"]
eGroup' => 'OfferFull'}).to_h["ItemLookupResponse"]["Items"]["Item"]
=> {"ASIN"=>"B000CST01A",
"OfferSummary"=>
{"LowestNewPrice"=>{"FormattedPrice"=>"Too low to display"},
"LowestUsedPrice"=>
{"Amount"=>"1515", "CurrencyCode"=>"USD", "FormattedPrice"=>"$15.15"},
"TotalNew"=>"24",
"TotalUsed"=>"1",
"TotalCollectible"=>"0",