Skip to content

Instantly share code, notes, and snippets.

View victorcolina22's full-sized avatar
🚀
Focusing

Victor Colina victorcolina22

🚀
Focusing
View GitHub Profile

Node + TypeScript

  1. Initial setup
mkdir typescript-starter
cd typescript-starter
  1. Setup Node.js package.json
@victorcolina22
victorcolina22 / gist:4105b7f7d9a511ab5ae84fcfc5b658d5
Last active October 5, 2024 04:28
Astro files formatting with prettier for Nvim editor

Astro files formatting

Install the plugins

pnpm/npm add/install -D prettier prettier-plugin-astro

Paste this code into your file ".prettierrc.mjs"

// .prettierrc.mjs

Send a message to Telegram

  1. Create a public channel in Telegram

  2. Create a bot chatting with "BotFather"

  3. Take the token provided after bot creation

  4. Make a fetch to Telegram API

@victorcolina22
victorcolina22 / folder-structure.md
Last active March 9, 2025 16:35
Folder structure for React Native project with Expo example

React Native folder structure with Expo

proyecto-app/
├── .expo/
├── .github/                   # Configuración para CI/CD y GitHub Actions
├── assets/                    # Recursos estáticos
│   ├── fonts/
│   ├── images/
│   └── animations/            # Animaciones Lottie

Command to search for a file in the system macOS

sudo find / -name nombre-de-archivo 2>/dev/null

Prettier config JSON for astro

{
  "arrowParens": "always",
  "bracketSameLine": false,
  "objectWrap": "preserve",
  "bracketSpacing": true,
  "semi": true,
 "experimentalOperatorPosition": "end",

Add custom commands for iTerm + ZSH.

  1. Create new file and name .my_custom_commands.sh
  2. Add some functions e.g
function ios() {
  open -a "Xcode" ~/Documents/iOS/MyiOSProject.xcodeproj
}

Template para levantar contenedor en docker con PostgreSQL

version: "3"

services:
  myDB:
    image: postgres:latest
    container_name: my-database
 restart: always

Comandos para mantener pantalla activa al cerrar laptop desenchufada MacOS

Ver configuración de hibernación

pmset -g | grep hibernatemode

Setear configuración para mantener pantalla activa

sudo pmset -a sleep 0

Commands to find and kill ports running on MacOS

View ports listening

sudo lsof -nP -iTCP -sTCP:LISTEN

View port listening on port provided

lsof -i :3000