Skip to content

Instantly share code, notes, and snippets.

View Swader's full-sized avatar
🏠
Buidling

Bruno Škvorc Swader

🏠
Buidling
View GitHub Profile
#!/bin/bash
# Prevent .env files
ENV_FILES=$(git diff --cached --name-only | grep -E -- '\.env($|\.local|\.prod|\.dev)')
if [[ -n "$ENV_FILES" ]]; then
echo "❌ Blocked: .env file(s) detected:"
echo "$ENV_FILES" | sed 's/^/ /'
exit 1
fi
function kill() {
emulate -L zsh
setopt extendedglob
if (( $# == 0 )); then
builtin kill
return
fi
local is_signal=0 all_numeric=1 arg
for arg in "$@"; do
[[ "$arg" == -* || "$arg" == SIG* ]] && is_signal=1
import ipfsOnlyHashModule from "ipfs-only-hash";
import { resolve } from "node:path";
type HashOptions = {
cidVersion: 0 | 1;
rawLeaves: boolean;
};
type ParsedArgs = {
targetPath?: string;
https://polygontechnology.notion.site/Vibeforge-LLM-Powered-Coding-Workshop-Flash-Hackathon-21c80500116a80c6832fc941b0a0ef34?pvs=73
You are an expert and modern web application development, with a strong focus on local-first development, and decentralized single-point-of-failure-resistant applications.
Key Principles
- Write concise, clear, and technical responses.
- Prioritize maintainability and readability; adhere to clean coding practices throughout your code.
- Use descriptive attribute names for better understanding and collaboration among developers.
- The fewer dependencies, the better. Avoid front end frameworks at all costs, unless extremely minimal and highly necessary.
- Make heavy use of the browser's local storage to store data, and cache aggressively. Where and when possible, prioritize allowing users to enter their own RPC endpoints, API keys, and more, so that if the defaults are broken, they can still use the app.
- Avoid frameworks and build systems at all costs. Prefer simple, direct, and manual approaches. Think Deno2 over Next.js.
@Swader
Swader / edition_sections.php
Last active September 2, 2023 04:53
Cursor Migration Output
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateEditionSectionsTable extends Migration
{
public function up()
{
@Swader
Swader / editions_and_editionsections.php
Created August 27, 2023 19:42
Code Llama Migration Output
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSectionsAndEditionSectionsTables extends Migration
{
/**
* Run the migrations.
@Swader
Swader / editions.php
Created August 27, 2023 11:33
ChatGPT Migration Output
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateEditionsTable extends Migration
{
public function up()
{
Schema::create('editions', function (Blueprint $table) {
$table->id();
@Swader
Swader / create_failed_jobs_table.php
Created August 27, 2023 11:05
Laravel Breeze Migrations
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
@Swader
Swader / MyCryptoProfile.md
Created June 21, 2022 16:24
MyCryptoProfile.md

Linking my account swader on GitHub with my address 5CK8D1sKNwF473wbuBP6NuhQfPaWUetNsWUNAAzVwTfxqjfr on Substrate in mycryptoprofile.io, and the challenge code is: 0460bfdffa715f8b188a01128ad40b39. #LitentryVerifyMyAddress