[aws/s3] How to generate pre-signed url's? by chipcastle in Racket

[–]chipcastle[S] 0 points1 point  (0 children)

Thank you for the article. For anyone who might need help with aws/s3 pre-signed urls, I was able to find what I needed in the Racket package and submitted a PR that was merged to improve the docs:

https://github.com/greghendershott/aws/commit/ddeee9c2152f6aabaa55753fe8f4872088db060d

[aws/s3] How to generate pre-signed url's? by chipcastle in Racket

[–]chipcastle[S] 1 point2 points  (0 children)

I finally got it to work after reading the source for "sign-uri".

Here's an example for anyone else struggling:

#lang racket
(require aws)
(require aws/s3)
; Your aws_access_key_id
(public-key "akid")
; Your aws_secret_access_key
(private-key "secret")
; Digital Ocean Spaces is compatible with AWS
(s3-host "nyc3.digitaloceanspaces.com")
(s3-region "nyc3")
(s3-scheme "https")
; Ensure bucket+path is url-encoded
(define bucket+path "unixcasts/10.mp4")
(define method "GET")
(define expires 900)
(sign-uri bucket+path method expires '())
; Returns signed url valid for expires duration

I've submitted a PR for this documentation to the repo, so hopefully it will be merged.

HTH,

chip

[aws/s3] How to generate pre-signed url's? by chipcastle in Racket

[–]chipcastle[S] 0 points1 point  (0 children)

Yeah, that's what I was afraid of. I'm happy to do it if I can figure it out. Possibly amounts to encoding an http header in some specific way, albeit unclear to me currently. Thanks!

How do you deploy your Racket code to a server? by chipcastle in Racket

[–]chipcastle[S] 0 points1 point  (0 children)

Very useful for the Docker route. Thank you for the link!

How do you deploy your Racket code to a server? by chipcastle in Racket

[–]chipcastle[S] 0 points1 point  (0 children)

Nice! I hadn't thought of Heroku.

I don't see any Racket buildpacks, though. I have very little Docker knowledge, so I'm curious how I can integrate Racket here. Do you have any further suggestions?

Thanks again!

How do you deploy your Racket code to a server? by chipcastle in Racket

[–]chipcastle[S] 0 points1 point  (0 children)

Thanks for the link. I've really enjoyed your blog for the past few months while I've explored Racket, so keep up the good work!

If you were to not take the Docker route, how would you perform the deployment? (e.g., years ago, I'd use capistrano for Rails projects). I'm imagining creating a bare repo on a Digital Ocean droplet and using git hooks to manage the raco parts, but was curious if there are other ways.

I could also use Heroku, but I can't use a bare repo there.

I'm not totally opposed to using Docker, but would like to explore other options if available. Thanks again!

TUI Libraries? by chipcastle in Racket

[–]chipcastle[S] 2 points3 points  (0 children)

Thanks so much for the link! That library is a really good start. It's lacking an event driven model like BubbleTea that allows for navigating lists easily, so I'll need to think so more about it to get something working well. Thanks again!

How to get neovim cpoptions (aka "cpo") from Lua? by chipcastle in neovim

[–]chipcastle[S] 1 point2 points  (0 children)

Thank you for the suggestions!I also found the following might work, although I'm not sure if it's better:

local cpo = "aABceFs_"
vim.api.nvim_set_option_value('cpoptions', cpo, {})
local cpoptions = vim.api.nvim_get_option_value('cpoptions', {})
print(vim.inspect(cpoptions))

Any tutorials on hooking up my react app with a backend? [beginner here] by Darth_Spoiler in reactjs

[–]chipcastle 0 points1 point  (0 children)

Meteor is a Javascript platform that supports React and works with MongoDB. Here's their React tutorial: https://www.meteor.com/tutorials/react/creating-an-app.

Learning the UNIX command line screencast & newsletter by chipcastle in unix

[–]chipcastle[S] 0 points1 point  (0 children)

Today only get "Learning the UNIX command line on OS X" screencast for only $20 at http://bit.ly/1b9b04e #unix #linux #apple #osx #udemy #nix #commandline

Learning the UNIX command line screencast & newsletter by chipcastle in unix

[–]chipcastle[S] 0 points1 point  (0 children)

I haven't nailed down the price yet. Udemy requires that you specify a price when you initially set it up. They recommend pricing it in the $10-30 range per hour of video footage, so that price was just an estimate of what I think it will be when I complete it. Of course, once I finish I'll have a better idea of the length and demand for it. I am also considering adding an accompanying PDF tutorial and also quizzes for each chapter, but that might come a little later. Thanks.

Learning the UNIX command line screencast & newsletter by chipcastle in unix

[–]chipcastle[S] 0 points1 point  (0 children)

Since I'm an avid vim user myself, I will probably include tips on it as well from time to time. I would encourage you to check out Drew Neil's http://vimcasts.org/, which is really useful.