Skip to content

Instantly share code, notes, and snippets.

View pedronauck's full-sized avatar

Pedro Nauck pedronauck

View GitHub Profile
@pedronauck
pedronauck / go_hook_lint.sh
Created August 4, 2025 19:11
Hook for Claude Code
#!/bin/bash
# Set up logging
LOG_FILE="$HOME/.claude/hooks/golangci-lint.log"
mkdir -p "$(dirname "$LOG_FILE")"
# Function to log with timestamp
log() {
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" >> "$LOG_FILE"
}
@pedronauck
pedronauck / reference-card.tsx
Created July 18, 2025 16:54
Reference Card
import { MagicCard } from "@/components/magicui/magic-card";
import { cn } from "@/lib/utils";
import type { LucideIcon } from "lucide-react";
import { ArrowRight } from "lucide-react";
import React from "react";
import { Icon } from "@/components/ui/icon";
import { tv, type VariantProps } from "tailwind-variants";
const referenceCard = tv({
slots: {
@pedronauck
pedronauck / keymap.json
Created February 4, 2025 23:41
Zed Configuration
// Zed keymap
//
// For information on binding keys, see the Zed
// documentation: https://zed.dev/docs/key-bindings
//
// To see the default key bindings run `zed: open default keymap`
// from the command palette.
[
{
"context": "Workspace",
@pedronauck
pedronauck / database.md
Created August 15, 2024 16:02
Database resources to study
@pedronauck
pedronauck / del_branch.fish
Last active October 28, 2023 01:04
Functions to remove branchs that was merged but not deleted
#
# filepath ~/.config/fish/functions/del_branch.fish
#
function del_branch --argument name
for name in $argv
# Check if the branch exists locally
set -l local_exists (git rev-parse --verify --quiet $name)
# Check if the branch exists remotely
@pedronauck
pedronauck / reset.css
Created June 20, 2022 19:24 — forked from EllyLoel/reset.css
CSS Reset
/*
Made by Elly Loel - https://ellyloel.com/
With inspiration from:
- Josh W Comeau - https://courses.joshwcomeau.com/css-for-js/treasure-trove/010-global-styles/
- Andy Bell - https://piccalil.li/blog/a-modern-css-reset/
- Adam Argyle - https://unpkg.com/[email protected]/normalize.min.css / https://codepen.io/argyleink/pen/KKvRORE
Notes:
- `:where()` is used to lower specificity for easy overriding.
*/
@pedronauck
pedronauck / Subscribe.tsx
Created July 11, 2020 18:52
Tailwind (with twin.macro), Emotion, NextJS and ChakraUI
/** @jsx jsx */
import { jsx, css } from '@emotion/core'
import tw from 'twin.macro'
import { Button, Input } from 'systems/Core'
export const Subscribe: React.FC = () => {
return (
<div css={styles.Root}>
<h4>Subscribe to our newsletter</h4>
@pedronauck
pedronauck / Header.tsx
Created July 11, 2020 00:11
Tailwind, PostCSS, Styled-JSX and NextJS
import React from 'react'
import { Link } from 'systems/Core/Link'
import css from 'styled-jsx/css'
export const Header = () => {
return (
<header className="Root">
<img src="/logo.svg" width={100} />
<div className="MainMenu">
<ul className="MenuList">
@pedronauck
pedronauck / machine.js
Created December 4, 2019 21:32
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@pedronauck
pedronauck / mix.exs
Created November 1, 2019 03:31 — forked from muziyoshiz/mix.exs
Sample of GraphQL Relay server on Phoenix
# mix.exs
defmodule PhoenixRelaySample.Mixfile do
use Mix.Project
def project do
[app: :phoenix_relay_sample,
version: "0.0.1",
elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,