FeroxCloudJoin free
TS

Tomás Silva

Open to opportunities

@tomas · Beginner · Lisbon, PT · Remote OK

Career switcher from accounting. Building daily.

Working mostly with HTML, CSS, React. Looking for a team that ships often and reviews code kindly.

5 followers6 following3 posts0 answersGitHub

Availability: Available now

251

Ferox Score

Stack

Languages: JavaScript

Badges

  • VVibe Pioneer

Tomás Silva reposted

TS

@tomas · 15d

Reposting this, it's the best SQL tip I've seen this month.

LF

@lena · 16d

Postgres tip: use SKIP LOCKED for a dead-simple job queue.

sql
UPDATE jobs SET status = 'running', started_at = now()
WHERE id = (
  SELECT id FROM jobs
  WHERE status = 'queued'
  ORDER BY created_at
  FOR UPDATE SKIP LOCKED
  LIMIT 1
)
RETURNING *;
TS

@tomas · 16d

Three months ago I was reconciling invoices. Today I merged my first PR to an open-source project. If you're switching careers: keep going.

TS

@tomas · 22d

My first recursive function that wasn't a tutorial:

javascript
function flatten(arr) {
  return arr.reduce((acc, x) => acc.concat(Array.isArray(x) ? flatten(x) : x), []);
}
console.log(flatten([1, [2, [3, [4]]], 5]));

You're all caught up.