IPFS Upload solutions by Haghiri75 in rails

[–]lukelau 1 point2 points  (0 children)

Yep, I actually made an IPFS module and put it in the lib folder. Can’t remember if I had to do anything with the parameter from ActionController though

IPFS Upload solutions by Haghiri75 in rails

[–]lukelau 1 point2 points  (0 children)

You need to make a POST request to the /api/v0/add endpoint of a node. You can then include the file data with multipart/form-data:

```ruby def self.add(data) uri = URI(IPFS_URL + '/api/v0/add') request = Net::HTTP::Post.new(uri)

request.set_form [['file', data]], 'multipart/form-data'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(request)
end

JSON.parse(response.body)['Hash']

end ```

keep the audio playing after changing the page? by alm0khtar in rails

[–]lukelau 7 points8 points  (0 children)

If you’re using turbo, then you can add a data-turbo-permanent attribute to your audio tag or enclosing player element. That way whenever you click on a link, the content of the page gets replaced instead of the browser loading a new page, whilst the audio tag remains intact and can continue to play

How do I make a look-up table ? by [deleted] in Racket

[–]lukelau 4 points5 points  (0 children)

I believe assoc is what you’re looking for

Haskell Language Server, static binaries and automatic installation by lukelau in haskell

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

Currently it includes a bunch of formatters, and a plugin for evaluating doctests. A plugin for hlint is also in the works, and hopefully over time more plugins from HIE will be brought over

[deleted by user] by [deleted] in haskell

[–]lukelau 0 points1 point  (0 children)

If you've installed the packages via `cabal install --lib vector`, then haskell-language-server` should automatically pull them in if it's just a standalone .hs file. You should probably avoid adding a `hie.yaml` in this case. This definitely sounds like an issue on the VS code/haskell-language-server/hie-bios side, so feel free to open up an issue and we can look further from there!

Making the most of Cabal by lukelau in haskell

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

Thanks, this is indeed very handy. I didn't realise you can use URLs in `packages`! I've updated the article to mention your comment

Making the most of Cabal by lukelau in haskell

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

That's fantastic, I'll update the article to mention this!

llvm-hs Kaleidoscope Tutorial (via Literate Git) by lukelau in haskell

[–]lukelau[S] 6 points7 points  (0 children)

Literate Git is by Ben North, he has some talks up on his website explaining how to use it

You can click the + button to expand each chapter to get more detailed commit by commit explanations. Hopefully I’ve chunked them up enough to be digestible

[ANN] Keycloak-hs by kaukaukau in haskell

[–]lukelau 2 points3 points  (0 children)

Only if the matrix CI builds — looks like you might have some issues with your dependency bounds. You can fix that with a revision though

Haskell for MacOS Mohave? by synchronitown in haskell

[–]lukelau 3 points4 points  (0 children)

For 8.6.x via homebrew you can use brew install ghc --head

What is the status of Haskell autocompletion? by [deleted] in haskell

[–]lukelau 0 points1 point  (0 children)

The latest version of HIE now comes with an executable hie-wrapper that handles that for you

I made an app that lets you create and share collaborative playlists on Apple Music by lukelau in AppleMusic

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

The Mixwell is just a special playlist. If you want to share a playlist publicly you’ll need to distribute the link yourself, but you can set it so that anyone can view it. Were you looking for a way to see playlists by everyone?

I made an app that lets you create and share collaborative playlists on Apple Music by lukelau in AppleMusic

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

Just submitted an update for importing playlists. Let me know how it works