Skip to content

Instantly share code, notes, and snippets.

View cemdrman's full-sized avatar
🇹🇷
Focusing

Cem cemdrman

🇹🇷
Focusing
View GitHub Profile
{
"users":[
{
"id":1,
"name":"cem",
"surname":"dırman",
"email":"cemdrman@gmail.com",
"detail":{
"created_at":"2019-03-22 23:33:52",
"age":"25",
@cemdrman
cemdrman / scalaBasics.scala
Created December 12, 2021 21:15
scala basics
object BasicsMain {
def main(args: Array[String]): Unit = {
var number = 100
number += 1
println(number)
var number1 : Int = 100
number1 += 1
println(number1)
@cemdrman
cemdrman / scalaCollections.scala
Created December 14, 2021 00:34
scala collections
import java.util
import scala.::
import scala.collection.mutable
import scala.collection.mutable.ListBuffer
object Collections {
def main(args: Array[String]): Unit ={
val nameList: Array[String] = new Array[String](3)
package streams;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class Main {
@cemdrman
cemdrman / RestAPIServer.scala
Created December 24, 2021 02:34
Scala with Akka Http
import ProductDB.{AddProduct, AddedProduct, FindAllProducts, FindProduct}
import akka.actor.{Actor, ActorLogging, ActorSystem, Props}
import akka.http.scaladsl.Http
import akka.http.scaladsl.model.{ContentTypes, HttpEntity, HttpMethods, HttpRequest, HttpResponse, StatusCodes, Uri}
import akka.pattern.ask
import akka.stream.ActorMaterializer
import akka.util.Timeout
import spray.json._
import scala.concurrent.{Future, duration}
@cemdrman
cemdrman / test.sh
Created October 3, 2022 16:09
Shell Script
#!/bin/bash
#special variables
echo $0
echo $n
echo $#
echo $*
echo $@
echo $?
#!/bin/bash
team1=("repo1" "repo2")
team2=("repo3" "repo4")
echo 'Enter your git user name:'
read user_name
import model.Blog;
import model.User;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Main {
package model;
import java.time.LocalDateTime;
public class Blog {
private String title;
private String photoUrl;
private String content;
private LocalDateTime publishDate;
package model;
import java.util.List;
public class User {
private String name;
private String email;
private String password;
private String profilePhoto;