Skip to content

Instantly share code, notes, and snippets.

View agustif's full-sized avatar

Agusti Fernandez agustif

View GitHub Profile
@MurkyMeow
MurkyMeow / Component.tsx
Last active February 20, 2024 13:52
useHover react hook
export const Component = () => {
const servicesRef = useRef<HTMLAnchorElement>(null);
const isServicesHovered = useHover(servicesRef);
return (
<Popover.Root open={isServicesHovered}>
<Popover.Trigger asChild>
<Link href="/" ref={servicesRef}>
Services
</Link>
@postmalloc
postmalloc / hn_sidebar.js
Last active August 30, 2023 08:10
Hacker News comments sidebar bookmarklet
// A handy bookmarklet to display comments from the top-rated Hacker News thread related to the current page
// Written with the help of GPT-4
javascript:(function() {
const createCommentElement = (comment, depth) => {
const commentWrapper = document.createElement('div');
commentWrapper.style.paddingLeft = (depth * 20) + 'px';
commentWrapper.style.marginBottom = '10px';
commentWrapper.style.marginLeft = '10px';
commentWrapper.style.color = '#333';
@yzdbg
yzdbg / auto-dr.md
Last active November 3, 2023 17:11

Automating Daily Reports, because fuck it, really...

Each day at our company, developers are required to document their activities, painstakingly jotting down their daily work and future plans. A monotonous chore that I just really dislike.

So now, there's a scribe for that :

auto-dr-

Code

@Webarkitekt
Webarkitekt / .env
Last active July 25, 2024 21:07
How to connect TinaCMS to Gitlab with gitbeaker
MONGODB_URI=[YOUR_MONGO_DB_URL]
GITLAB_HOST=[YOUR_GITLABHOST_URL]
GITLAB_PROJECT_ID=[YOUR_GITLAB_PROJECT_ID]
GITLAB_BRANCH=[YOUR_GITLAB_BRANCH]
GITLAB_PERSONAL_ACCESS_TOKEN=[YOUR_GITLAB_TOKEN]
TINA_PUBLIC_IS_LOCAL=false
# _optionally_ Use Tina Cloud for user authentication
#NEXT_PUBLIC_TINA_CLIENT_ID=***
@VictorTaelin
VictorTaelin / gpt4_abbreviations.md
Last active September 20, 2024 00:13
Notes on the GPT-4 abbreviations tweet

Notes on this tweet.

  • The screenshots were taken on different sessions.

  • The entire sessions are included on the screenshots.

  • I lost the original prompts, so I had to reconstruct them, and still managed to reproduce.

  • The "compressed" version is actually longer! Emojis and abbreviations use more tokens than common words.

@maximedegreve
maximedegreve / contract_lottery.sol
Last active January 30, 2023 16:45
TinyFaces NFT Lottery 1.1 (Contract)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import 'erc721a/contracts/ERC721A.sol';
import 'erc721a-upgradeable/contracts/ERC721AUpgradeable.sol';
import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "operator-filter-registry/src/upgradeable/OperatorFiltererUpgradeable.sol";

Title Buzzed Bees DAO

TL;DR Save Bees while maintaining & improving the new "Existing Communities" Nouns Builder feature

Description

The Buzzed Bee DAO has 2 very clear objectives.

@looki
looki / outpainting.py
Created September 13, 2022 02:23
Simple CLI for parlance-zz's outpainting noise generation script
# Code extracted from https://github.com/parlance-zz/g-diffuser-bot/tree/g-diffuser-bot-diffuserslib-beta
#
# `pip install numpy image scikit-image` should cover all dependencies, but they are probably installed if you're using SD.
#
# The GitHub recommends a denoising strength of 0.6 and config scale of 10.
# I've found a bit higher values for the denoising strength to work better, ymmv
import os, sys
from PIL import Image
@nmushegian
nmushegian / gist:8fdb4eff9d9f998f71f610d694734f81
Last active August 31, 2024 04:08
monospace and dumb money
- monospace protocols company principles
- We are an R&D firm.
- We only work on systems we believe are credibly neutral, and aim to make this definition rigorous.
- Any software written for a client must be licensed permissively.
- We do not operate validators (we run full nodes but do not produce blocks). People can run whatever they want as individuals or side ventures.
- We only accept investments from entities that leave us complete control over when and how to allocate funds and to pay returns. We are making long term plays and there is no reason to invest in us if you don't think we know what we are doing.
- Software Writers
- Software writers spend 60% time on personal projects and 40% on company projects.
- Software writers own their IP, but must license it permissively (more specifics later).