For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
This post also appears on lisper.in.
Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.
Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):
The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.
| (defun spacemacs/go-run-directory () | |
| (interactive) | |
| (shell-command | |
| (format "go run %s" (concat (file-name-directory (buffer-file-name)) "*.go")))) |
| import psycopg2 | |
| import psycopg2.extras | |
| import random | |
| db_params = { | |
| 'database': 'jobs', | |
| 'user': 'jobsuser', | |
| 'password': 'superSecret', | |
| 'host': '127.0.0.1', | |
| 'port': '5432', |
Copyright 2008 Google Inc.
| 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 |
| // 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 |
| // 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 |
| // 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, |