This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
integrations_conf = YAML.load_file("#{Rails.root}/config/integrations.yml")['production’] | |
Restforce.configure do |config| | |
config.username = integrations_conf['SALESFORCE']['USERNAME'] | |
config.password = integrations_conf['SALESFORCE']['PASSWORD'] | |
config.security_token = integrations_conf['SALESFORCE']['TOKEN'] | |
config.client_id = integrations_conf['SALESFORCE']['CLIENT_ID'] | |
config.client_secret = integrations_conf['SALESFORCE']['CLIENT_SECRET'] | |
config.host = integrations_conf['SALESFORCE']['HOST'] if integrations_conf['SALESFORCE']['HOST'].present?a | |
end | |
client = Restforce.new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util | |
import com.fasterxml.jackson.databind.{DeserializationFeature, ObjectMapper} | |
import com.fasterxml.jackson.module.scala.DefaultScalaModule | |
import com.yotpo.metorikku.exceptions.MetorikkuException | |
import org.apache.kafka.clients.consumer.{KafkaConsumer, OffsetAndMetadata} | |
import org.apache.kafka.common.TopicPartition | |
import org.apache.spark.sql.streaming.StreamingQueryListener | |
import org.apache.spark.sql.streaming.StreamingQueryListener._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val props = new Properties() | |
props.put("bootstrap.servers", "127.0.0.1:9092") | |
props.put("group.id", "DummyConsumerGroupID") | |
props.put("key.deserializer", "org.apache.kafka.common.serialization.StringDeserializer") | |
props.put("value.deserializer", "org.apache.kafka.common.serialization.StringDeserializer") | |
new KafkaConsumer[String, String](props) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"regexp" | |
"strconv" | |
) | |
// Don’t send `SameSite=None` to known incompatible clients. | |
func shouldSendSameSiteNone(useragent string) (bool, error) { | |
sameSiteNoneIncompatible, err := isSameSiteNoneIncompatible(useragent) |