Skip to content

Instantly share code, notes, and snippets.

View ManzDev's full-sized avatar
💻
Trapped inside a terminal

Manz ManzDev

💻
Trapped inside a terminal
View GitHub Profile
@ManzDev
ManzDev / vite-ts.md
Created November 17, 2022 17:04
Typescript + Vite
sudo apt-get install curl jq
sudo curl -s https://manz.dev/download/mkweb -o /usr/local/bin/mkweb
sudo chmod +x /usr/local/bin/mkweb
mkweb project-name
cd project-name
@ManzDev
ManzDev / README.md
Last active September 30, 2022 14:58
mkweb
@ManzDev
ManzDev / settings.json
Created October 31, 2020 03:09
settings.json from Windows Terminal
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{58ad8b0c-3ef8-5f4d-bc6f-13e4c00f2530}",
// To learn more about global settings, visit https://aka.ms/terminal-global-settings
"copyOnSelect": true,
"confirmCloseAllTabs": true,
"copyFormatting": false,
"largePasteWarning": true,
@ManzDev
ManzDev / create-lit-app
Last active May 2, 2020 01:27
Create LitElement app
#!/bin/bash
if [ "$1" == "" ]; then
echo "Syntax: create-lit-element <folder>"
exit
fi
if [ -x git ]; then
echo "Command git not found. Install with sudo apt-get install git"
exit
@ManzDev
ManzDev / README_npm_config.sh
Last active March 17, 2020 16:31
Pasos para configurar NPM correctamente y ejecutar comandos de terminal de forma global sin problemas de permisos
# Actualizamos los repositorios de apt-get
apt-get update
# Instalamos (si no los teníamos ya, sudo, curl, vim y nano)
apt-get install sudo curl vim nano
# Este paso descarga el instalador de node 13 y lo ejecuta
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
# Este paso puedes obviarlo (sólo lo utilice para crear un usuario sin permisos)
@ManzDev
ManzDev / fix-npm.sh
Last active December 3, 2020 23:33
Fix permissions E_ACCESS from npm
# Por defecto, npm instala en una ruta (habitualmente /usr) todos los comandos CLI de NPM instalados con "npm install -g"
# Con el siguiente comando, puedes ver donde está guardando NPM en tu sistema:
> npm config get prefix
# Si te aparece /usr, vamos a cambiarlo por ~/.npm-global ( /home/TUUSUARIO/.npm-global ) para evitar problemas de permisos
# PASOS PARA SOLUCIONAR EL PROBLEMA
# PASO 1: Creamos nueva carpeta donde guardaremos toda la información global de NPM
mkdir ~/.npm-global
@ManzDev
ManzDev / check_versions
Last active December 14, 2019 23:22
Show command versions
#!/bin/bash
# Colors
BLUE=$(printf '\033[34m')
YELLOW=$(printf '\033[33m')
PINK=$(printf '\033[35m')
CYAN=$(printf '\033[36m')
GREEN=$(printf '\033[32m')
RED=$(printf '\033[31m')
RESET=$(printf '\033[m')
@ManzDev
ManzDev / dockertags
Created August 5, 2019 03:07
Search tags in docker hub
#!/bin/bash
if [ $# -lt 1 ]
then
cat << HELP
dockertags - list all tags for a Docker image on a remote registry.
SYNTAX: dockertags <image> [tag-word]
$ dockertags ubuntu -- list all tags for ubuntu
@ManzDev
ManzDev / linux-setup.sh
Last active December 15, 2019 01:20
Linux setup (WIP)
#!/bin/bash
# Script for prepare Ubuntu/Debian distro
# 2019 - Manz (terminaldelinux.com)
#
# Prerequisites:
# - curl sudo bash installed
# - script executed as non-root (but sudo permissions)
#
# --gui Install GUI software
@ManzDev
ManzDev / .aliases
Last active June 3, 2019 16:30
Bash aliases
export DISPLAY=:0
# Copy/Paste
alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'
# Top Commands
alias topcommands='history | tr -s " " | cut -d" " -f3 | sort | uniq -c | sort -n | tail -20'
# Javascript