Copyright 2008 Google Inc.
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
| (defun spacemacs/go-run-directory () | |
| (interactive) | |
| (shell-command | |
| (format "go run %s" (concat (file-name-directory (buffer-file-name)) "*.go")))) |
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 psycopg2 | |
| import psycopg2.extras | |
| import random | |
| db_params = { | |
| 'database': 'jobs', | |
| 'user': 'jobsuser', | |
| 'password': 'superSecret', | |
| 'host': '127.0.0.1', | |
| 'port': '5432', |
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.dvliman.demo | |
| // src/main/kotlin/com/dvliman/Router.kt | |
| import com.dvliman.demo.user.UserHandler | |
| import org.springframework.context.annotation.Bean | |
| import org.springframework.http.MediaType.APPLICATION_JSON | |
| import org.springframework.stereotype.Component | |
| import org.springframework.web.reactive.function.server.router |
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
| // src/main/kotlin/com/dvliman/user/UserHandler | |
| package com.dvliman.demo.user | |
| import org.springframework.http.HttpStatus | |
| import org.springframework.http.MediaType.APPLICATION_JSON | |
| import org.springframework.web.bind.annotation.RestController | |
| import org.springframework.web.reactive.function.server.ServerRequest | |
| import org.springframework.web.reactive.function.server.ServerResponse | |
| import reactor.core.publisher.Mono |
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
| // src/main/kotlin/com/dvliman/demo/user/UserRepo.kt | |
| package com.dvliman.demo.user | |
| import org.davidmoten.rx.jdbc.Database | |
| import org.davidmoten.rx.jdbc.Parameter | |
| import org.springframework.stereotype.Component | |
| import reactor.core.publisher.Mono | |
| import reactor.core.publisher.Flux | |
| import reactor.core.publisher.toFlux |
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
| // src/main/kotlin/com/dvliman/demo/user/UserModels.kt | |
| package com.dvliman.demo.user | |
| import org.springframework.web.reactive.function.server.ServerResponse | |
| import org.springframework.http.MediaType.APPLICATION_JSON | |
| import reactor.core.publisher.Mono | |
| data class User( | |
| val user_id: Int, |
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
| // src/main/resources/application.properties | |
| demo.db.url = jdbc:postgresql://localhost/demo |
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
| // src/main/kotlin/com/dvliman/demo/Beans.kt | |
| package com.dvliman.demo | |
| import org.davidmoten.rx.jdbc.Database | |
| import org.springframework.context.annotation.Bean | |
| import org.springframework.context.annotation.Configuration | |
| @Configuration | |
| class Beans { |