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
@iamandrewluca
iamandrewluca / remove-twitter.md
Created February 12, 2024 20:01
Remove Twitter
View remove-twitter.md

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
View plus-one.js
function plusOne(digits) {
let index = digits.length - 1
while (true) {
digits[index] += 1;
if (digits[index] > 9 && index === 0) {
digits[index] = 0
digits.unshift(1);
break;
View cto-time.md
  • Sustainable Technology Practices: Integrating sustainability into tech processes and products. https://12factor.net
  • 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
iamandrewluca / YouTube-Watch-Later-Time.js
Created January 11, 2024 10:50
YouTube Watch Later Time
View YouTube-Watch-Later-Time.js
$$('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
iamandrewluca / open-source.md
Last active December 11, 2023 07:51
Some Questions and Answers about my Open-Source Experience
View open-source.md

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
iamandrewluca / ceo-hour-questions.md
Created October 12, 2023 11:59
CEO Hour Questions
View ceo-hour-questions.md
  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?
View audible-wishlist-page-total-minutes.js
$$('.runtimeLabel')
.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
@iamandrewluca
iamandrewluca / zod-message-protocol.ts
Created February 22, 2023 22:20
Zod message protoco
View zod-message-protocol.ts
import { z } from 'zod'
function createMessageProtocol<T extends z.ZodObject<{ type: z.ZodLiteral<string> }>>(events: T[]) {
// Add types from Zod
function createSender(fn: (data: any) => void) {
return (data: any) => fn(data)
}
// extract event types somehow
let types = events.map((e) => e.shape.type._type)
@iamandrewluca
iamandrewluca / script.js
Created February 10, 2023 13:48
Unbookmark Mastodon bookmarks
View script.js
let interval = setInterval(() => {
let bookmark = document.querySelector('.bookmark-icon')
if (bookmark) bookmark.click()
else clearInterval(interval)
}, 1000)
@iamandrewluca
iamandrewluca / youtube-dl.md
Last active April 21, 2023 07:32
YouTube DL Commands
View youtube-dl.md

Download ringtones

https://github.com/yt-dlp/yt-dlp

yt-dlp -x --audio-format m4a --audio-quality 0 ...
# Ringtones should be no more then 35 seconds
mv *.m4a *.m4r