This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Login every 12 hours | |
aws codeartifact login --tool dotnet --repository <repo_name> --domain <domain_name> --domain-owner <account_number> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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++ { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Credits: https://nizu.tech/go-blog-1 | |
FROM golang:alpine | |
RUN mkdir /app | |
WORKDIR /app | |
ADD go.mod . | |
ADD go.sum . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(!function_exists('config_path')) | |
{ | |
/** | |
* Return the path to config files | |
* @param null $path | |
* @return string | |
*/ | |
function config_path($path=null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Axios.interceptors.request.use(function (config) { | |
const session = JSON.parse(localStorage.getItem('session')); | |
config.headers['X-Token'] = session ? `${session.token}` : ''; | |
return config; | |
}); | |
Axios.interceptors.response.use((response) => { // intercept the global error | |
return response | |
}, function (error) { | |
if (error.response.status === 401) { // if the error is 401 and hasent already been retried |
NewerOlder