Skip to content

Instantly share code, notes, and snippets.

View recursivecodes's full-sized avatar
💯
Living the dream

Todd Sharp recursivecodes

💯
Living the dream
View GitHub Profile
@recursivecodes
recursivecodes / Movie.java
Created February 14, 2022 16:51
Movie.java
@MappedEntity
@AllArgsConstructor(access = AccessLevel.PACKAGE)
@NoArgsConstructor
@Data
@EqualsAndHashCode
public class Movie {
@Id
@GeneratedValue
private String id;
private String title;
@recursivecodes
recursivecodes / list-movies.sh
Created February 14, 2022 14:52
list-movies.sh
$ curl localhost:8080/movie | jq
@recursivecodes
recursivecodes / list-movies-output.sh
Created February 14, 2022 14:52
list-movies-output.sh
HTTP/1.1 200 OK
date: Wed, 26 Jan 2022 19:19:29 GMT
Content-Type: application/json
content-length: 199
connection: keep-alive
[
{
"id": "620a6521ca65e72ff82ef9ba",
"title": "Back to the Future",
@recursivecodes
recursivecodes / create-app.sh
Created February 14, 2022 14:52
create-app.sh
$ mn create-app --build=gradle --jdk=11 --lang=java --test=spock codes.recursive.oci-atp-mongo
@recursivecodes
recursivecodes / get-movie.sh
Created February 14, 2022 14:52
get-movie.sh
$ curl localhost:8080/movie/620a6521ca65e72ff82ef9ba | jq
@recursivecodes
recursivecodes / delete-movie.sh
Created February 14, 2022 14:52
delete-movie.sh
$ curl -i -X DELETE localhost:8080/movie/61f19db7c83ba32b4ca5a468
@recursivecodes
recursivecodes / mongo-create-user.sh
Last active February 24, 2022 12:48
mongo-create-user.sh
> use mnajd
> db.new_collection.insert({ some_key: "some_value" })
@recursivecodes
recursivecodes / mongo-admin.sh
Created February 14, 2022 14:52
mongo-admin.sh
$ mongosh mongodb://admin:[pass]@HVG9ND7XIBSAEGV-DEMOAJD.adb.us-phoenix-1.oraclecloudapps.com:27017/admin\?authMechanism=PLAIN\&authSource=\$external\&ssl=true\&retryWrites=false\&loadBalanced=true
@recursivecodes
recursivecodes / list-movies.sql
Created February 14, 2022 14:52
list-movies.sql
select
id,
m.data.title,
m.data.description,
m.data.runtimeMinutes,
m.data.rating
from movie m;
@recursivecodes
recursivecodes / mongosh-user.sh
Created February 14, 2022 14:52
mongosh-user.sh
[direct: mongos] mnajd> show dbs
mnajd 344 kB
[direct: mongos] mnajd> show collections
new_collection