This file contains hidden or 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
| object Networking { | |
| private val appCache = Cache(File("cacheDir", "okhttpcache"), 10 * 1024 * 1024) | |
| private val bootstrapClient = OkHttpClient.Builder().cache(appCache).build() | |
| private val dns = DnsOverHttps.Builder().client(bootstrapClient) | |
| .url("https://dns.google/dns-query".toHttpUrl()) | |
| .bootstrapDnsHosts(InetAddress.getByName("8.8.4.4"), InetAddress.getByName("8.8.8.8")) | |
| .build() | |
| fun provideOkHttpClient(dataStorage: DataStorage): OkHttpClient { |
This file contains hidden or 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
| FROM ruby:2.7 | |
| RUN mkdir -p /usr/src/app | |
| COPY job.sh /usr/src/app | |
| COPY collection /usr/src/app/collection | |
| WORKDIR /usr/src/app | |
| RUN gem install mosql | |
| CMD ["bash", "mosql.sh"] |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| MAP=('Collection1.yml' 'Collection2.yml' 'Collection3.yml') | |
| for m in "${MAP[@]}" | |
| do | |
| mosql -c "./collection/${m}" --sql "${MOSQL_POSTGRESQL}" --mongo ${MOSQL_MONGODB} --only-db "${MOSQL_DB}" & | |
| done |
This file contains hidden or 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
| #!/bin/bash | |
| #read user inputs | |
| echo Git Username: | |
| read GITNAME | |
| echo Git Password: | |
| read GITPASS | |
| echo DCOS URL: | |
| read DCOSURL |
This file contains hidden or 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
| # build_args() { | |
| # printf " --build-arg %s=%s" "$@" | |
| # } | |
| # sudo docker build $(build_args IMS_AD_PORT IMS_AD_PARSE_APP_ID IMS_AD_PARSE_JS_KEY IMS_AD_AWS_SQS_QUEUE) \ | |
| # -t kamoljan/ad:1.0 api | |
This file contains hidden or 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
| hfold install-awscli | |
| if ! which aws >/dev/null; then | |
| sudo apt-get -y install awscli | |
| fi | |
| hfold --end |
This file contains hidden or 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 ( | |
| "image" | |
| _ "image/jpeg" | |
| _ "image/png" | |
| "log" | |
| "os" | |
| "github.com/chai2010/webp" |
This file contains hidden or 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
| def solution(A): | |
| l = len(A) | |
| if not (0 < l <= 100000): | |
| return -1 | |
| s_l = s_r = 0 | |
| s = sum(A) | |
| for i in range(l): |
This file contains hidden or 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 ( | |
| "fmt" | |
| ) | |
| func print(i int) string { | |
| if i%3 == 0 { | |
| if i%5 == 0 { | |
| return fmt.Sprintf("%d PipipiPopopo\n", i) |
This file contains hidden or 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |