Como cambiar audio source con el teclado


Select source

El cuento corto es que cada tanto uso los speakers de la compu pero a veces necesito cambiar a los auriculares y viceversa. Antes, lo hacía con los system settings de audio escogiendo el output deseado. Para esto tenía que traer spotlight/alfred CMD + Spacebar y escribir sound (cuantas veces me equivoqué por escribir rápido con soud sólo para tener que borrar la d y escribir la n) y con el mouse escoger la salida que quería.

No más.

Ahora hago CMD + Shift + H para los auriculares y CMD + Shift + M para los speakers.

¿Cómo?

Con un par de goodies:

SwitchAudioSource es el programa que deja cambiar la salida de sonido desde la terminal y con Script kit puse los shortcuts para las dos acciones que contaba arriba.

Igual, como me gusta mucho de hacer alias tengo unos cuantos alias para usar SwitchAudioSource (porque quien va a escribir todo eso!):

alias shead="SwitchAudioSource -s \"External Headphones\""
alias smac="SwitchAudioSource -s \"MacBook Pro Speakers\""
alias sall="SwitchAudioSource -a"
alias scur="SwitchAudioSource -c"

Y con eso, los scripts finales para Script kit quedaron en:

// Name: Shortcut to Headphones
// Shortcut: cmd shift h

import "@johnlindquist/kit"

await $`/bin/zsh -lic shead`

y

// Name: Shortcut to Speakers
// Shortcut: cmd shift m

import "@johnlindquist/kit"

await $`/bin/zsh -lic smac`

Saludos,
Gorka


Hábitos para perseguir y hábitos para evitar


Traits

**If you could invest in a friend and get 10% of their income for life -- who would you pick?**

• Why would you invest in that person?
• What character traits do they have?

Now you have a list of character traits to adopt.

**If you could short a friend's earnings, who would you pick and why?**

Now you have a list of character traits to avoid.

Me encantó. La idea es que los humanos somos buenos para analizar los hábitos y errores de los demás pero no tanto para los propios. La manera que se propone incluso hace uso de un análisis objetivo pensando en conseguir un retorno al invertir en una persona para luego “girar” el pensamiento hacía darte cuenta que siempre pudiste ver lo que hacen bien y por eso invertirías - en lugar de invertir, adopta los buenos hábitos y en lugar de “shortear”, evita los malos hábitos.

Fuente

Saludos,
Gorka


Snippets: input & paste


Don't tread on me

const dontTreadOnMe = (e) => e.stopImmediatePropagation();
document.addEventListener('paste', dontTreadOnMe, true);

A mi me pasa en un par de websites que cuando quiero pegar la contraseña parece ser que lo deshabilitaron, este snippet permite deshabilitar la deshabilitación - ja!

Fuente

Saludos,
Gorka


Snippets: WET y DRY


Wet vs Dry

When you find yourself adding if statements to a piece of code in order to get it to behave differently under different scenarios, you’re creating a confusion. Don’t try to make one thing act like two things. Instead, separate it into two things.

No sé si estoy de acuerdo con este blog post: Why I don’t buy “duplication is cheaper than the wrong abstraction”. Tiene una opinión interesante y racional acerca de la situación código repetido vs la abstracción incorrecta, pero la frase me gustó mucho, creo que está bueno diferenciar “la abstracción incorrecta” de una “confusión” y creo que de ahora en adelante voy a usar el término.

Y definitivamente, voy a usar la frase de evitar hacer que una cosa funcione como dos cosas, en lugar implementa las dos cosas por separado.

Saludos,
Gorka


Snippets: categorización de colegas complicados


Improve together

Este blog post managing bad engineers, habla de cómo mejorar el trabajo en equipo con personas complicadas haciendo una categorización de qué tipos de personalidades y situaciones en las que se ven representados. También propone formas de mejorar la comunicación con este tipo de colegas para lograr un buen funcionamiento del equipo.

Aquí dejo el snippet de las categorias:

The Procrastinator Procrastinators tend to delay tasks, often focusing on less important tasks while ignoring the critical ones. They may have poor time management skills, often underestimating the time required to complete tasks. This behavior can lead to missed deadlines, increased stress for the team, and potential risks to the project.

The Lone Wolf Lone Wolves assume they’re the most competent person and prefer to work alone, often resisting collaborative efforts — I mean, why would you need someone else’s help if they’re far inferior to you? Usually, they do not participate in team discussions unless to tell everyone that they “could’ve done that in 3 days”. While their self-reliance can sometimes be an asset, it can also lead to a lack of cohesion and potential misalignment with team goals. And most importantly — people don’t enjoy working with Lone Wolves.

The Negative Nancy Negative Nancies tend to overly focus on the negative aspects of situations, overlooking potential solutions. They may complain frequently, resist change, and spread negativity within the team. This behavior can dampen team morale and hinder creativity and innovation. “Why are they forcing us to do X? Urgh, I like how things are now.”

The Over-Promiser Over-Promisers tend to be overly optimistic about their capabilities or the time required to complete tasks and secretive when things don’t go as planned. Even during status updates, they can say, “It’s going great,” even though they’re struggling to find a solution and face some blockers — because they still hope to finish it on time. They often fail to deliver on their promises, which leads to frustration and mistrust within the team and with the Product Owners.

The Know-It-All Know-It-Alls tend to be arrogant and closed-minded. They often lack the ability to listen to others and are highly resistant to change or new ideas. As you can imagine, this behavior is quite annoying for others who want to spar with ideas and figure out the best way to build something. Overall this stifles creativity, hinders team collaboration, and creates a hostile work environment.

The Silent Type Silent Types, in general, tend to be introverted and may struggle with communication. Even though they might immediately see the issues with the solution, they might think, “It’s not worth it to share the concerns, to antagonize someone.” They often keep their thoughts to themselves, which can lead to misunderstandings or missed opportunities for collaboration.

The Perfectionist Very often, Perfectionists are recent graduates. They tend to focus on minute details, often at the expense of the bigger picture. They may struggle with the KISS principles and delegation and have high, sometimes unrealistic, standards for themselves and others. In their mind, the code is art, and they should not be rushed while creating an art piece. This behavior leads to inefficiencies, missed deadlines, and increased stress for the whole team.

The Unreliable One Unreliable employees are identified by their tardiness — constantly late, submitting unfinished work, and skipping meetings. They lack commitment, discipline, or time management skills. Or all three combined. Their inconsistent performance can lead to mistrust and frustration within the team and potentially (highly likely) jeopardize project timelines.

The Conflict Instigator Conflict Instigators tend to be argumentative, aggressive, and disruptive. They thrive on drama and create a toxic work environment. This behavior can lead to decreased team morale, increased stress, and reduced productivity.

The Burned-Out Employee Burned-out employees exhibit signs of exhaustion, cynicism, and reduced professional efficacy. They struggle to meet deadlines, have the lowest output on the team, and make more mistakes than over the previous observable period.

Saludos,
Gorka


Snippets: items para hacer como nuevo manager de un equipo


Leadership

Hace unos días encontré este blog post: What I learned after managing a small team for 2 years, y me gustó mucho la idea de un framework con un checklist de cosas para hacer cuando tomas el rol de lider en un proyecto/equipo existente.

Dejo los items aqui para fácil acceso (y así no tengo que estar cavando y buscando en mi email, a ver si me dejé el link por ahí):

La idea de snippets, es tener a la mano los detalles que me hicieron eco cuando encuentro cosas online.

Saludos,
Gorka


Nuevos juguetes: Status Keycard


Status Keycard

Hace unas semanas me crucé con un par de personas del equipo de Status, nos juntamos en un co-working space para trabajar en Aragon y justo estaban ahí también.

Platicando de ideas y proyectos y lo que estamos haciendo cada quien por su lado para el mundo Web 3.0 tuve la suerte que me regalaran una de estas tarjetas.

La idea es fantástica, la tarjeta es similar a una hardware wallet (ya escribiré un post acerca de otro de estos que tmb tengo), es decir, la llave privada con la que se firman transacciones la tiene la tarjeta, y no hay manera de obtenerla en uso normal, por lo que se puede entender como segura.

Cuando se necesita firmar algo, la tarjeta lo hace a través de NFC (similar a usar un celular/reloj para pagar). Se envía la data que se necesita firmar a la tarjeta, y esta regresa la data firmada con la llave privada.

Definitivamente es muy interesante, tiene un poco de hipo aún: hay que tener la tarjeta bien firme (que no se mueva) por los segundos que está firmando o puede fallar la operación - no es deal breaker pero por ahora si puede ser difícil usarla.

Se pueden crear combinaciones interesantes con otras hardware y software wallets, algo como: usar la keycard como llave privada de uso diario derivando la llave privada desde otra hardware wallet de uso de largo plazo. En fin, ya veremos y les iré contando.

Saludos,
Gorka


Pagination