To keep the changes from the commit you want to undo
$ git reset --soft HEAD^
To destroy the changes from the commit you want to undo
$ git reset --hard HEAD^
You can also say
@JsonSerialize(using = SingularResponseSerializer::class) | |
data class SingularResponse<T> constructor( | |
val key: String, | |
val item: T | |
) | |
class SingularResponseSerializer<T>: JsonSerializer<SingularResponse<T>>() { | |
override fun serialize(value: SingularResponse<T>, gen: JsonGenerator, serializers: SerializerProvider) { | |
val obj: Map<String, T> = mapOf(value.key to value.item) | |
gen.writeObject(obj) |
To keep the changes from the commit you want to undo
$ git reset --soft HEAD^
To destroy the changes from the commit you want to undo
$ git reset --hard HEAD^
You can also say
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)package main | |
import ( | |
"fmt" | |
"github.com/gorilla/mux" | |
"github.com/gorilla/securecookie" | |
"net/http" | |
) | |
// cookie handling |
node_modules | |
*.swp |