Skip to content

Instantly share code, notes, and snippets.

@codigoconjuan
codigoconjuan / loginSchema.js
Last active January 16, 2025 20:21
loginSchema con vee-validate para Login
export const loginSchema = {
email(value) {
if (!value) {
return 'Este campo es obligatorio';
}
// si es un email válido
const regex = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
if (!regex.test(value)) {
return 'Email no válido';
}
@mjbalcueva
mjbalcueva / calendar.tsx
Last active January 16, 2025 20:19
shadcn ui calendar custom year and month dropdown
"use client"
import * as React from "react"
import { buttonVariants } from "@/components/ui/button"
import { ScrollArea } from "@/components/ui/scroll-area"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { cn } from "@/lib/utils"
import { ChevronLeft, ChevronRight } from "lucide-react"
import { DayPicker, DropdownProps } from "react-day-picker"
@djGrill
djGrill / Preferences.sublime-settings
Last active January 16, 2025 20:17
Sublime Text 3 Settings
{
// Sets the colors used within the text area.
// The value "auto" will switch between the "light_color_scheme" and
// "dark_color_scheme" based on the operating system appearance.
"color_scheme": "auto",
"light_color_scheme": "Breakers.sublime-color-scheme",
"dark_color_scheme": "Mariana.sublime-color-scheme",
// Note that the font_face and font_size are overridden in the platform
// specific settings file, for example, "Preferences (Linux).sublime-settings".
@bradtraversy
bradtraversy / vscode_shortcuts.md
Last active January 16, 2025 20:17
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@Laith98Dev
Laith98Dev / custom_in_array.php
Last active January 16, 2025 20:24
Faster in_array
<?php
function custom_in_array(string|int $key, array $arr): bool
{
return preg_match('/\b(' . implode("|", array_map(fn($word) => preg_quote($word, "/"), $arr)) . ')\b/i', $key) === 1;
}
// 800 element
$myArray = [
"j8onxb92q6lmuzjmby7e",
@tzmartin
tzmartin / ios.settings.schemes.md
Created January 13, 2016 18:27
iOS Settings URL Scheme List

Settings URL schemes:

Note: < i=OS 5.1 use prefs:. > 5.1 use app-settings:

  • app-settings:root=General&path=About
  • app-settings:root=General&path=ACCESSIBILITY
  • app-settings:root=AIRPLANE_MODE
  • app-settings:root=General&path=AUTOLOCK
  • app-settings:root=General&path=USAGE/CELLULAR_USAGE
  • app-settings:root=Brightness
@HarmJ0y
HarmJ0y / PowerView-3.0-tricks.ps1
Last active January 16, 2025 20:15
PowerView-3.0 tips and tricks
# PowerView's last major overhaul is detailed here: http://www.harmj0y.net/blog/powershell/make-powerview-great-again/
# tricks for the 'old' PowerView are at https://gist.github.com/HarmJ0y/3328d954607d71362e3c
# the most up-to-date version of PowerView will always be in the dev branch of PowerSploit:
# https://github.com/PowerShellMafia/PowerSploit/blob/dev/Recon/PowerView.ps1
# New function naming schema:
# Verbs:
# Get : retrieve full raw data sets
# Find : ‘find’ specific data entries in a data set
@bartleby
bartleby / iOS URL Schemes
Created August 22, 2018 17:48
iOS URL Schemes
URL Schemes
Apple
 
Apple Music     — music://geo.itunes.apple.com/us/albums/<albumID>
                – music://geo.itunes.apple.com/us/artists/<artistID>
 
Apple News      — applenews://
App Store       — itms-apps://itunes.apple.com/app/<appID>
Apple TV        — videos://
@scyto
scyto / proxmox.md
Last active January 16, 2025 20:12
my proxmox cluster

ProxMox Cluster - Soup-to-Nutz

aka what i did to get from nothing to done.

note: these are designed to be primarily a re-install guide for myself (writing things down helps me memorize the knowledge), as such don't take any of this on blind faith - some areas are well tested and the docs are very robust, some items, less so). YMMV

Purpose of Proxmox cluster project

Required Outomces of cluster project

@JeremyMorgan
JeremyMorgan / shake.go
Last active January 16, 2025 20:12
The most important code I've ever written
package main
import (
"fmt";
)
func loopit(phrase string, repeat int)(string){
var outputphrase string = "";