Skip to content

Instantly share code, notes, and snippets.

View estevanjantsk's full-sized avatar
:shipit:

Estevan Jantsk estevanjantsk

:shipit:
  • Tallinn
  • 06:28 (UTC +03:00)
View GitHub Profile
@planetoftheweb
planetoftheweb / README prompt generator
Created July 6, 2024 15:52
Prompt for Generating README files using Chat GPT
You're a professional and experienced web developer and open source contributor. Create a first release README document for these files. The target audience is professional developers with five years of experience building online projects.
- Include a description
- A list of interesting techniques the code uses in the files provided. When possible link to MDN documentation as part of the text of the technique.
- A list of non-obvious technologies or libraries used in the code that would be of interest to professional developers with medium level experience.
- Make sure you add links to external libraries, including links to any specific fonts used.
- A breakdown of the project structure as a directory list code block: Include directories like any images directories or subfolders implied by the code, but not individual files unless they're in the root directory. Add a short description of any interesting directories underneath the code block
- If you mention a file or directory in the description, link to the
@gimenete
gimenete / safeParse.ts
Last active March 15, 2024 16:05
A wrapper around the fetch function that validates the response body against a Zod schema
import z from "zod";
export async function safeFetch<T>(
schema: z.Schema<T>,
input: RequestInfo,
init?: RequestInit
): Promise<T> {
const response = await fetch(input, init);
if (!response.ok) {
@DaniruKun
DaniruKun / .iex.exs
Created January 31, 2023 16:44
My custom global IEx script file that is preloaded before each IEx session. Adds some convenience functions.
IO.puts("Using .iex.exs file loaded from #{__DIR__}/.iex.exs")
defmodule Util do
def atom_status do
limit = :erlang.system_info(:atom_limit)
count = :erlang.system_info(:atom_count)
IO.puts("Currently using #{count} / #{limit} atoms")
end
@agmm
agmm / nextjs-file-upload-api.js
Created January 31, 2020 23:03
Simple Nextjs File Upload — Backend API
// Backend
import formidable from 'formidable';
export const config = {
api: {
bodyParser: false,
},
};
export default async (req, res) => {
@arajkumar
arajkumar / dummy-pr.sh
Last active December 2, 2022 13:29
Create dummy PR
set -e
BRANCH="dummy-$(date +%Y.%m.%d-%s)"
git fetch origin master && git checkout -b $BRANCH FETCH_HEAD
touch ${BRANCH}
git add ${BRANCH} && git commit -m "chore: Dummy PR to retrigger CI"
git rm ${BRANCH} && git commit -m "chore: Dummy PR to retrigger CI"
git push fork $BRANCH --force
@jeromecoupe
jeromecoupe / webstoemp-gulpfile.js
Last active May 13, 2025 15:54
Gulp 4 sample gulpfile.js. For a full explanation, have a look at https://www.webstoemp.com/blog/switching-to-gulp4/
"use strict";
// Load plugins
const autoprefixer = require("autoprefixer");
const browsersync = require("browser-sync").create();
const cp = require("child_process");
const cssnano = require("cssnano");
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");
@harrietty
harrietty / RAILS_5_CHEATSHEET.md
Last active August 13, 2023 00:36 — forked from mdang/RAILS_CHEATSHEET.md
Ruby on Rails 5 Cheatsheet

Ruby on Rails Cheatsheet (5.1)

Architecture

RVM

$ rvm list - show currently installed Rubies

@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active March 7, 2025 05:00
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@jessejanderson
jessejanderson / intro-to-otp-in-elixir-resources.md
Last active September 27, 2024 08:14
Intro to OTP in Elixir - Resources
@c33k
c33k / Update .gitignore
Last active June 5, 2025 05:08
Updating .gitignore and cleaning the cache
//First commit any outstanding code changes, and then, run this command:
git rm -r --cached .
//This removes any changed files from the index(staging area), then just run:
git add .
//Commit
git commit -m "Atualizando .gitignore para..."