Skip to content

Instantly share code, notes, and snippets.

View pocco81's full-sized avatar
🍁
I may be slow to respond.

pocco pocco81

🍁
I may be slow to respond.
  • Mars
View GitHub Profile
@pocco81
pocco81 / README-Template.md
Created August 27, 2020 03:31 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@pocco81
pocco81 / README.md
Last active September 16, 2020 04:41
Welcome to my GitHub page!

Hi there 👋! I'm Sebastian


  • 🌱 Programming growth: Python, Bash, Markdown and Arduinoo
  • Languages: Spanish, English, Portuguese & Esperanto
  • 📫 Contact: kdav5758.contact@gmail.com

GitHub followers GitHub watchers

@pocco81
pocco81 / Online_file_checker.sh
Created September 16, 2020 04:27
This will check if the folder exists, and then create it if false
file_1=test_1; if [ -d "$file_1" ]; then echo -e "\nfile:\t→→\t$file_1\nstatus: exists"; else echo -e "file:\t→→\t$file_1\nstatus: does not exists\n"; read -p "Do you want to create $file_1? (y/n): " u_answer; case $u_answer in y|Y|yes|Yes|YES|YeS|YEs|yeS) echo -e "creating $file_1...\n"; `mkdir $file_1`; case "${?}" in 0) echo -e "\nfile: $file_1\nstatus: created"; ;; *) echo -e "ERROR: something happened\nthis might be caused because you don't have permission to write to this folder\nrun 'cd ..' & 'sudo chmod 775 your_folder'"; ;; esac; ;; n|N|No|nO|n0|N0|no) echo "Glad to help!"; ;; *) echo -e "ERROR: command $u_answer not recognized\nexiting the program..."; ;; esac; fi
@pocco81
pocco81 / .vimrc
Last active January 12, 2021 18:05
this is my old .vimrc
if $COLORTERM == 'gnome-terminal'
set t_Co=256
endif
set shell=bash
map <C-z> u
set nocompatible " be iMproved, required
#!/bin/bash
#sve = System Variable Exemplifier
#This script executes whatever file you tell regardless of in which directory it's currently in.
script_help=$( cat << EOF
This script executes whatever file you tell regardless of
in which directory it's currently in. In order or execution,
#!/bin/bash
#sve = System Variable Exemplifier
#This script executes whatever file you tell regardless of in which directory it's currently in.
script_help=$( cat << EOF
This script executes whatever file you tell regardless of
in which directory it's currently in. In order or execution,
@pocco81
pocco81 / xterm-bg.sh
Created March 28, 2021 23:06 — forked from blueyed/xterm-bg.sh
Query background setting from terminal (xterm / rxvt-unicode)
#!/bin/sh
#
# Query a property from the terminal, e.g. background color.
#
# XTerm Operating System Commands
# "ESC ] Ps;Pt ST"
oldstty=$(stty -g)
# What to query?
@pocco81
pocco81 / GitDeleteCommands.ps1
Created April 15, 2021 03:36 — forked from cmatskas/GitDeleteCommands.ps1
Git Delete Branch commands
## Delete a remote branch
$ git push origin --delete <branch> # Git version 1.7.0 or newer
$ git push origin :<branch> # Git versions older than 1.7.0
## Delete a local branch
$ git branch --delete <branch>
$ git branch -d <branch> # Shorter version
$ git branch -D <branch> # Force delete un-merged branches
## Delete a local remote-tracking branch
@pocco81
pocco81 / alacritty-tmux-vim_truecolor.md
Created August 1, 2021 17:26 — forked from andersevenrud/alacritty-tmux-vim_truecolor.md
True Color and Italics w/alacritty + tmux + vim

This should make true-color and italics work in your tmux session.

Tested successfully in bash and zsh with latest packages from Arch (with exception of Neovim from Git) 20019-07-07.

Notes

  1. Don't use &t_8f and &t_8b in your vim config
  2. Don't set $TERM in your zshrc, bashrc, etc. Let your terminal set this. So far xterm-256color has worked best for me.

Testing colors

@pocco81
pocco81 / os.capture
Created September 15, 2021 03:12 — forked from dukeofgaming/os.capture
Capture console output from Lua system call
---
-- Function to retrieve console output
--
function os.capture(cmd, raw)
local handle = assert(io.popen(cmd, 'r'))
local output = assert(handle:read('*a'))
handle:close()
if raw then