Skip to content

Instantly share code, notes, and snippets.

@trfiladelfo
trfiladelfo / CPFValidator.kt
Last active April 27, 2024 18:59
Validador de CPF em Kotlin
fun isCPF(document: String): Boolean {
if (document.isEmpty()) return false
val numbers = document.filter { it.isDigit() }.map {
it.toString().toInt()
}
if (numbers.size != 11) return false
//repeticao
@arkatsy
arkatsy / zustand-internals.jsx
Last active April 27, 2024 18:57
How zustand works internally
import { useSyncExternalStore } from "react";
// For more on the useSyncExternalStore hook, see https://react.dev/reference/react/useSyncExternalStore
// The code is almost identical to the source code of zustand, without types and some features stripped out.
// Check the links to see the references in the source code.
// The links are referencing the v5 of the library. If you plan on reading the source code yourself v5 is the best way to start.
// The current v4 version contains lot of deprecated code and extra stuff that makes it hard to reason about if you're new to this.
// https://github.com/pmndrs/zustand/blob/fe47d3e6c6671dbfb9856fda52cb5a3a855d97a6/src/vanilla.ts#L57-L94
function createStore(createState) {
@MWins
MWins / project-ideas01.md
Last active April 27, 2024 18:54
Back end Projects - list

Project Ideas

Ok. I'm going to list off some ideas for projects. You will have to determine if any particular idea is good enough to include in a portfolio. These aren't creative ideas. They likely already exist. Some are way too advanced while others are simplistic.

I will recommend to post any project you make to github and make a github project page for it. Explain in as much detail as possible how you made it, how it can be improved etc. Document it.

If you pick an advanced idea, setup a development roadmap and follow it. This will show some project management skills.

Another piece of advice for those who are design challenged. Use different front end frameworks and use different themes for those frameworks to provide appealing designs without looking like yet another bootstrap site.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 18:58
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active April 27, 2024 18:51
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@GusGA
GusGA / pt_guide.md
Last active April 27, 2024 18:47
Guía de configuración de equipos en packet tracer

Script de comandos de packet tracer

Equipo Switch

Entrar en modo EXEC privilegiado

Ejecutar el comando enable

Switch> enable
@UserUnknownFactor
UserUnknownFactor / Japanese SFX.md
Last active April 27, 2024 18:46
Japanese game and manga text sound effect (SFX) database

Introduction

This is a compiled collection of common Japanese SFXs (sound effects or onomatopoeia).

This collection uses mostly Romaji transliterations. Some SFXs can be used in combination with other SFXs; some of them, or combinations thereof, can be written separately for emphasis within the same panel (example: do-ki-, ドッ キッ ), but can be considered part of the same action; some use repeated sub-elements or prolongation characters (ー) within them. All interjections can be written differently, usually to indicate particularly strong or repeated stimulation. For example, a cho in isolation is almost certainly a truncated version of chotto, where the speaker was distracted from finishing the word. A prolongation of a character, on the other hand, often implies lazy, harsh, or sloppy pronunciation, or possibly even a scream. Because of this, many SFXs can have multiple meanings, depending on the action drawn, as well as one's interpretation of that action.

A

a: general interjection and versa

@fbartho
fbartho / 0. Synology RAID Expansion-Resync Performance.md
Last active April 27, 2024 18:42
Walkthrough of what I did to increase performance on my Synology NAS box during an expansion, and afterwards.

Performance on Synology RAIDs

(especially while expanding)

Warning: The exact commands may not match for your particular linux OS / Synology(NAS) device. I had to customize the commands after exploring my particular system's setup.

If you're new to linux, or this is a new piece of hardware / a new synology device, jump down to the section called "Inspecting a setup"

Contents