Pinned post

Hey folks! Welcome to ruby.social! 🎉

I'm hoping this will become a good, friendly community for Ruby-folks to chat and discover new friends. But for that to happen, you need to sign up!

ruby.social -- all are welcome

```
#!/usr/bin/env ruby

time_to_wait = ARGV[0].to_i

loop do
display_attached = `system_profiler SPDisplaysDataType | grep "Thunderbolt Display"`.chomp.length > 0

if display_attached
puts "#{Time.now} - Detected external display: instructing computer to not idle-sleep to avoid crashing, for #{time_to_wait} seconds"

`caffeinate -i -t #{time_to_wait}`
else
puts "#{Time.now} - No display detected. Sleeping for #{time_to_wait} seconds"

sleep time_to_wait
end
end
```

Show thread

I got so sick of my Mac crashing any time it slept while connected to a display that I wrote some Ruby to fix it!

James Adam boosted

Hello! Using my first toot to link to my PR with a fix for an edge case in Rails that also fixes an old demeter violation. github.com/rails/rails/pull/43

James Adam boosted

Ruby on Rails has released v. 7.0!!

This time I had the honor & privilege to contribute with 8 commits.

I'm so grateful for maintainers and contributors who

rubyonrails.org/2021/12/15/Rai

James Adam boosted

This past year I have been working on my spare time to build a web interface for Masto.host.

It's starting to come together and I expect in about a month to start running a closed beta test.

I have wrote more details here: masto.host/access-to-backups/

Any questions or suggestions please let me know.

James Adam boosted

This is all of the Ruby code you need:

#!/usr/bin/env ruby

require "http"

HTTP.auth("Bearer YourMastodonAccessTokenGoesHere")
.post("ruby.social/api/v1/statuses", :params => {:status => "You can toot to Mastodon using the HTTP gem in TWO lines. I'm doing it right now"})

Show thread
James Adam boosted

What are you using to install different :ruby: versions?

I have turned on account moderation. I actually turned it on a few weeks ago, but then turned it off during to make it easier for attendees to join.

However, less than a day later, an account appeared posting links which clearly broke the instance rules, so it's back to moderation again.

It's not actually that much trouble to approve the accounts, and it's vastly preferable to having to suspend abusive ones, so overall I think this was the right choice.

Anyway! Ruby! :ruby:

Show thread

I'm quite enjoying this year's remote version of - clever use of Discord gives a good sense of community even with most of the talks being pre-recorded.

railsconf.org

Anyone else here "attending"?

I'm considering switching the signup process on this instance to being directly moderated, instead of fully open; around 30% of the signups at the moment are companies that only want to put their links online.

Does anyone have any concerns about this?

James Adam boosted

RT @therubygalaxy@twitter.com

Interested in speaking at Ruby Galaxy? Our CFP is now open!!Take a look at rubygalaxy.io 🛰

🐦🔗: twitter.com/therubygalaxy/stat

James Adam boosted

Furthermore, it's recommended that you install cypress via npm, vendoring it in each project.

Got ten projects? Kiss 7GB of disk space goodbye.

I know that efficient disk space hasn't always been a top priority in the NPM world, but still, yeesh...

Show thread

I'm a big believer in system tests, and I front-end developers I know really like Cypress, so this will be interesting to explore: gilesbowkett.com/blog/2020/10/

What's crazy about Cypress, though, is that the Cypress app is 704MB. That's one hell of a development dependency.

interblah.net/two-thoughts-abo - in which I take inspiration from @robbyrussell's latest podcast episode for a couple of thoughts about maintainable software :ruby:

How much more of my disk space must I sacrifice to `node_modules`? All of it? :(

Show older
Ruby.social

A Mastodon instance for Rubyists & friends