Skip to content

Instantly share code, notes, and snippets.

View xerardoo's full-sized avatar
🎯
Focusing

Lucio G Pazos xerardoo

🎯
Focusing
View GitHub Profile
@xerardoo
xerardoo / del_vscode_mac.md
Created May 29, 2024 07:05 — forked from karansinghgit/del_vscode_mac.md
How to completely uninstall VSCode on Mac
  1. Close and Quit VSCode

  2. Remove VScode from Applications (just go to Finder -> Applications and move VSCode to Bin)

  3. Execute these commands in any order. The paths might be slightly different for you.

rm -fr ~/.vscode*
rm -fr ~/Library/Application\ Support/Code/

rm -fr ~/Library/Saved\ Application\ State/com.microsoft.VSCode.savedState/
rm -fr ~/Library/Preferences/com.microsoft.VSCode.helper.plist 
@xerardoo
xerardoo / cmd.txt
Created August 12, 2022 20:16
AWS CLI DotNet Login Mac
# Login every 12 hours
aws codeartifact login --tool dotnet --repository <repo_name> --domain <domain_name> --domain-owner <account_number>
@xerardoo
xerardoo / dotnet.txt
Last active August 10, 2022 03:17
DotNet Commands
DotNet
----------------------------------------------------
dotnet new sln -o project_name
dotnet new webapi -o api_name
dotnet new classlib -o lib_name
dotnet add project_name reference lib_name
@xerardoo
xerardoo / main.go
Last active June 9, 2022 11:00
How manage money in go
// https://golangprojectstructure.com/representing-money-and-currency-go-code/
// Manage in cents (integer)
package main
import "fmt"
func main() {
var sum float32
for i := 0; i < 1000000; i++ {
@xerardoo
xerardoo / Dockerfile
Created February 4, 2022 08:46
Dockerfile for Golang API Project
# Credits: https://nizu.tech/go-blog-1
FROM golang:alpine
RUN mkdir /app
WORKDIR /app
ADD go.mod .
ADD go.sum .
@xerardoo
xerardoo / free-dns.txt
Last active July 12, 2021 08:07
Free Open Public DNS Server - Quad9 (Malware Blocking Enabled):
Free Open Public DNS Server
Quad9 (Malware Blocking Enabled):
IPv4:
Primary: 9.9.9.9
Secondary: 149.112.112.112
IPv6:
Primary: 2620:fe::fe
var order OrderReq
err := c.BindJSON(&order)
if err != nil {
c.JSON(500, gin.H{"msg": err.Error()})
return
}
currentcb := m.GetCurrentCashBalance()
if currentcb.ID == 0 {
c.JSON(400, gin.H{"msg": "No cash balance opened - No existe corte de caja abierto"})
@xerardoo
xerardoo / scrollTop.vue
Created June 5, 2020 16:43
scoll top vue component
<template>
<button @click="goUp" class="btn-up" v-bind:class="{ 'd-block': show }">
<font-awesome-icon :icon="['fas', 'arrow-circle-up']"/>
</button>
</template>
<script>
// Based on: https://www.w3schools.com/howto/howto_js_scroll_to_top.asp
export default {
name: "ScrollTop",
@xerardoo
xerardoo / compat_l5.php
Created April 8, 2020 21:43 — forked from vluzrmos/compat_l5.php
Lumen L5 compatibility helpers. That file should be added on root path of your project... and added to your composer.json
<?php
if(!function_exists('config_path'))
{
/**
* Return the path to config files
* @param null $path
* @return string
*/
function config_path($path=null)
@xerardoo
xerardoo / LumenNginxUbuntu
Created March 14, 2020 18:26 — forked from melcma/LumenNginxUbuntu
Lumen + Nginx + Ubuntu
cd ~
sudo apt-get update
1. Install PHP and Nginx
#apt-get install software-properties-common
sudo apt-get -y install nginx php7.0 php7.0-fpm php7.0-mbstring php7.0-xml git composer
2. Config Nginx