Skip to content

Instantly share code, notes, and snippets.

View iamandrewluca's full-sized avatar
Git Inspector

Andrei Luca iamandrewluca

Git Inspector
View GitHub Profile
const cacheControlDirective = new GraphQLDirective({
name: 'cacheControl',
locations: [
args: {
maxAge: {
import { createAuth } from "@keystone-6/auth";
import { statelessSessions } from "@keystone-6/core/session";
import type { Lists } from ".keystone/types";
type Session = {
name: string;
createdAt: string;
type Join<T extends string, U extends string = T> =
iamandrewluca / same-tab-links.js
Created April 19, 2024 13:15
open links in same tab
iamandrewluca /
Created February 12, 2024 20:01
Remove Twitter

Get rid of all content from Twitter

How to use "Remove Tweets"

  1. Sign in to Twitter
  2. Go to your Profile
  3. Open DevTools and go to the 'Console' tab
  4. Copy and paste the following script
function plusOne(digits) {
let index = digits.length - 1
while (true) {
digits[index] += 1;
if (digits[index] > 9 && index === 0) {
digits[index] = 0
  • Sustainable Technology Practices: Integrating sustainability into tech processes and products.
  • Emerging Technologies: Explore the latest advancements in technology and how they might impact your industry.
  • Tech Ethics and Responsibility: Discussing the ethical implications of technology and how to address them.
iamandrewluca / YouTube-Watch-Later-Time.js
Created January 11, 2024 10:50
YouTube Watch Later Time
$$('ytd-playlist-video-renderer .style-scope ytd-thumbnail-overlay-time-status-renderer')
.map(e => e.textContent.trim().split(':').reverse())
.map(([s = '0', m = '0', h = '0']) => ({ s: parseInt(s), m: parseInt(m), h: parseInt(h) }))
.map(({ s, m, h }) => s + m * 60 + h * 3600)
.reduce((a, b) => a + b) / 3600
iamandrewluca /
Last active December 11, 2023 07:51
Some Questions and Answers about my Open-Source Experience

Can you share your motivation behind contributing to open-source projects, and how did you get started?

It started with me trying to fix some bugs on libraries that I used in my day-to-day projects. From this, I saw two positive outcomes: my hard skills began to improve much faster 🚀, and I started to be recognized as a more professional developer by HR 👨‍💻.

What fuels your passion for coding and contributing to open-source projects?

Nowadays, it doesn't feel like a passion anymore; it feels more like the right thing to do, and the right way to do things. 🤝

Are there specific aspects of software development that you find particularly fulfilling?

iamandrewluca /
Created October 12, 2023 11:59
CEO Hour Questions
  1. How do you handle the stresses and pressures of being the CEO?
  2. What are some areas where you think we could innovate or improve, outside of our core product or service?
  3. What opportunities do you see for employee growth and development?
  4. How do you see our industry evolving, and how are we positioned to adapt?
  5. What do you hope to achieve with these "CEO Hour" sessions in the long term?
  6. What's one thing you wish you knew more about regarding the day-to-day operations of the company?
  7. How would you describe the company culture you’re aiming for?
  8. How do you foster a culture of innovation within the company?
  9. What's your vision for the company over the next 5 years?
  10. Are there any books, podcasts, or other resources that have significantly influenced your leadership style?
.map(e => e.textContent.trim().replace('Length: ',''))
.map(text => {
const hasHours = text.includes('and')
const [hText, mText] = hasHours
? text.split(' and ')
: ['0 hrs', text]
const h = Number.parseInt(hText)
const m = Number.parseInt(mText)
return h * 60 + m