Skip to content

Instantly share code, notes, and snippets.

View arinaldi's full-sized avatar

Tony Rinaldi arinaldi

View GitHub Profile
@arinaldi
arinaldi / clipboard.jsx
Created January 27, 2022 17:25
Copy text to clipboard
async function copy() {
await navigator.clipboard.writeText(code);
setCopyText('✅ Copied!');
setTimeout(() => {
setCopyText('Copy');
}, 1000);
}
@arinaldi
arinaldi / key.js
Created January 23, 2022 22:31
Generate key
node -e "console.log(crypto.randomBytes(32).toString('hex'))"
@arinaldi
arinaldi / sample.js
Last active October 11, 2018 17:12
Async/await with multiple promises
const URL = 'https://api.github.com/users/';
const getData = async (usernames) => {
const promises = usernames.map(username => fetch(`${URL}${username}`).then(r => r.json()));
const userData = await Promise.all(promises);
return userData;
};
const data = await getData(['arinaldi', 'thomasdtucker']);
console.log({ data });
@arinaldi
arinaldi / post.md
Last active March 23, 2017 22:55
#post I'm a chicken lady

I'm a chicken lady

What's wrong, my Michelle? Oh, Silvee, I can't stop thinking about Tony, wondering where he could be, who he is with, what is he thinking, is he thinking of me, and whether he'll ever return someday. Oh, Michelle. Hmmm? You have to stop lying awake wondering about Tony, wondering where he is, who he could be with, what he's thinking, if he's thinking of you, and whether he'll ever return one day. Oh. What? Upstairs we are having a fabulous party, but we've run out of wine. So I am forced to borrow a bottle of yours. My God, it stinks in here! It stinks of stupid women wondering about Tony, wondering where he could be, who he is with, what he's thinking, whether he's thinking of you, and whether he'll ever return someday.

Head crusher

I'm crushing your head. I'm crushing your head. Crush. Crush.

Now, for those of you with a brave heart and for those of you who have stayed, look i

@arinaldi
arinaldi / post.md
Last active March 23, 2017 22:54
#post My timing is digital

My timing is digital

Lore is no longer functioning. I am attempting to fill a silent moment with non-relevant conversation. Captain - I am seeking advice in how to... take my Worf, please. The unidirectional nature of the time continuum makes that an unlikely possibility. But there is nothing more... uniquely human. Course laid in, sir. It means that you have achieved in disgrace what I have always aspired to be. That story is generally considered to be apocryphal. One is my name. The other is not.

  • I could be chasing an untamed ornithoid without cause.
  • But I am not capable of love.
  • It would appear that my program designed to predict emotional responses needs... adjustment.
  • That was the stun setting.
  • I consider Geordi to be my best friend.
  • One of his adages is that once you have eliminated the impossible, whatever remains, however improbable, must be the truth.
@arinaldi
arinaldi / post.md
Last active March 23, 2017 22:54
#post Bob Loblaw's law blog

Bob Loblaw's law blog

Bob Loblaw

Chickens don't clap! Caw ca caw, caw ca caw, caw ca caw, caw ca caw. It's as Ann as the nose on Plain's face.

Michael, I'm your older brother. I'll never be proud of you. Why are you squeezing me with your body? It's a hug, Michael. I'm hugging you. I may have committed some light treason.

Do you have any idea how often you say the word "afraid"? Yes, Annyong. Your name is Annyong! We all know you're Annyong!

@arinaldi
arinaldi / post.md
Last active March 30, 2017 22:46
#post Yada yada yada

Yada yada yada

George: Why is nice bad? What kind of a sick society are we living in when nice is bad. George: Why did I tell her I like her? I have this sick compulsion to tell women how I feel. Puddy: I painted my face Elaine: You painted your face? Puddy: Yeah.' Elaine: Why? Puddy: Well, you know, support the team. Kramer: Hey, you know what would make a great coffee table book? A coffee table book about coffee tables. George: When you look annoyed all the time, people think that you're busy. ; Elaine: I don't know how you guys walk around with those things. George: Yeah, well, the jerk store called, they're running out of you. Jerry: I thought you said people dressed up when they go to the opera? Kramer: People do. I don't. Jerry: I gotta get on that Internet. I'm late on everything? George: I'm speechless. Speechless! I have no speech. Kramer: Jerry, now what you do with your personal life is your business. But when you're on my set, you clean it up mister. Thanks! Jerry: Hello, Newman. Jerry: I do

@arinaldi
arinaldi / post.md
Last active March 23, 2017 22:52
#post Life, uh... finds a way

Life, uh... finds a way

It's a Unix system, I know this!

There's no unauthorized breeding in Jurassic Park. How do you know they're all female? Don't you see the danger, John, inherent in what you're doing here?

You bred raptors? They show extreme intelligence, even problem-solving intelligence. Clever girl. Because we're being hunted.

Yeah, but your scientists were so preoccupied with whether or not they could that they didn't stop to think if they should. Boy, do I hate being right all the time.