Skip to content

Instantly share code, notes, and snippets.

@tnarla
tnarla / page.tsx
Created February 2, 2024 20:35
Valentine website
"use client";
import { useState } from "react";
export default function Page() {
const [noCount, setNoCount] = useState(0);
const [yesPressed, setYesPressed] = useState(false);
const yesButtonSize = noCount * 20 + 16;
const handleNoClick = () => {
setNoCount(noCount + 1);

[This portion of call begins at 25:47]

Me: I could make it really easy on you, if you think Apollo is costing you $20 million per year, cut me a check for $10 million and we can both skip off into the sunset. Six months of use. We're good. That's mostly a joke.

Reddit: Six months of use? What do you mean? I know you said that was mostly a joke, but I want to take everything you're saying seriously just to make sure I'm not - what are you referring to?

Me: Okay, if Apollo's opportunity cost currently is $20 million dollars. At the 7 billion requests and API volume. If that's your yearly opportunity cost for Apollo, cut that in half, say for 6 months. Bob's your uncle.

Reddit: You cut out right at the end. I'm not asking you to repeat yourself for a third time, but you legit cut out right at the end. "If your opportunity cost is $10 million" and then I lost you.

// "donut strings" by davey @beesandbombs
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
@Klerith
Klerith / plugins.md
Last active May 5, 2023 13:42
Lista de plugins que uso en VSC
@mattiasghodsian
mattiasghodsian / index.php
Last active April 28, 2023 08:36
[PHP] List any users public gists
/**
* Title: Get gists
* Author: Mattias Ghodsian
* Description: List any users public gists
* Donate a cup of coffee: https://www.buymeacoffee.com/mattiasghodsian
* Donate Eth: 0xBBB96204E45D11C9799c6B12E6eE6F0d4A071Ef5
*/
$profile_url = "https://api.github.com/users/mattiasghodsian/gists";
$options = array('http' => array('user_agent'=> $_SERVER['HTTP_USER_AGENT']));
@jamieparfet
jamieparfet / macOS-mojave-iso.sh
Last active February 11, 2023 19:16
Create an ISO from the mojave installer app
#!/bin/bash
# This assumes that the ~6GB mojave installer is in the /Applications folder.
# If it's not, just open the App Store, search Mojave, and you can download the installer file from there.
hdiutil create -o /tmp/mojave.cdr -size 6g -layout SPUD -fs HFS+J
hdiutil attach /tmp/mojave.cdr.dmg -noverify -mountpoint /Volumes/install_mojave
sudo /Applications/Install\ macOS\ mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_mojave
mv /tmp/mojave.cdr.dmg ~/Desktop/InstallSystem.dmg
hdiutil detach /Volumes/Install\ macOS\ mojave
@yphastos
yphastos / SortFilesInFolderByYearMonth.ps1
Last active January 27, 2022 15:57
Sort files in folders by year/month
<#
Original from:
https://www.thomasmaurer.ch/2015/03/move-files-to-folder-sorted-by-year-and-month-with-powershell/
Sort files inside a folder and move them to YYYY/MM folders.
#>
@shimizu
shimizu / .block
Last active May 22, 2021 16:32
D3 v4 - Voronoi diagram on Google Maps
license: mit
@santisbon
santisbon / Search my gists.md
Last active July 14, 2024 18:07
How to search gists.

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@MoOx
MoOx / README.md
Last active May 11, 2023 13:59
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily