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
| docker info > /dev/null 2>&1 | |
| PROJECT_NAME=${1:-example-app} | |
| SERVICES=${2:mysql,redis} | |
| # Ensure that Docker is running... | |
| if [ $? -ne 0 ]; then | |
| echo "Docker is not running." | |
| exit 1 | |
| fi |
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
| import io.circe._, io.circe.generic.semiauto._, io.circe.syntax._ | |
| val johnDoe = Person("John Doe", 24, Address(5, "Times Square Street", "New York", "12345")) | |
| println(Person.encode(johnDoe)) | |
| val encodedText = """ | |
| { | |
| "name" : "Fin", | |
| "age" : 21, |
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
| import io.circe._, io.circe.generic.semiauto._, io.circe.syntax._ | |
| case class Address(doorNo: Int, street: String, city: String, zipCode: String) | |
| object Address { | |
| implicit val codec = deriveCodec[Address] | |
| } | |
| case class Person(name: String, age: Int, address: Address) | |
| object Person { |
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
| case class Address(doorNo: Int, street: String, city: String, zipCode: String) | |
| case class Person(name: String, age: Int, address: Address) |
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 com.example.org; | |
| import org.mockserver.integration.ClientAndServer; | |
| import org.mockserver.mock.action.ExpectationForwardAndResponseCallback; | |
| import org.mockserver.model.HttpRequest; | |
| import org.mockserver.model.HttpResponse; | |
| import static org.mockserver.model.Header.header; | |
| import static org.mockserver.model.HttpClassCallback.callback; | |
| import static org.mockserver.model.HttpRequest.request; |
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/sh | |
| apt-get update -y | |
| apt-get upgrade -y | |
| apt-get install -y git mysql-server | |
| apt-get install -y wget systemd | |
| systemctl enable mysql | |
| systemctl start mysql | |
| echo "Get the download link based on your platform from https://gogs.io/docs/installation/install_from_binary \n." |
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
| Given a number in Roman numeral format, convert it to decimal. | |
| The values of Roman numerals are as follows: | |
| { | |
| 'M': 1000, | |
| 'D': 500, | |
| 'C': 100, | |
| 'L': 50, | |
| 'X': 10, |
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
| echo "">ALL.txt | |
| while read line | |
| do | |
| echo "//file name " $line >> ALL.txt | |
| cat $line >> ALL.txt | |
| done < genFile.g |
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
| ex1.l | |
| ex2.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
| for i in `seq 5` #consider that we have 5 seasons | |
| do | |
| mkdir S$i; # creating directory | |
| mv *S$i* S$i; #moving the files | |
| done |
NewerOlder