Skip to content

Instantly share code, notes, and snippets.

View pascencio's full-sized avatar
💭
Work in progress

Patricio Ascencio Aravena pascencio

💭
Work in progress
  • Santiago, Santiago Metropolitan, Chile
View GitHub Profile
@pascencio
pascencio / 01_nuxt-bootstrap-vue-with-pure-boostrap.md
Last active January 3, 2022 13:41
Nuxt.js snippet for bootstrap, bootstrap-vue, popper and jquery configuration
@ygrenzinger
ygrenzinger / CleanArchitecture.md
Last active May 20, 2024 05:21
Summary of Clean Architecture by Robert C. Martin

Summary of book "Clean Architecture" by Robert C. Martin

Uncle Bob, the well known author of Clean Code, is coming back to us with a new book called Clean Architecture which wants to take a larger view on how to create software.

Even if Clean Code is one of the major book around OOP and code design (mainly by presenting the SOLID principles), I was not totally impressed by the book.

Clean Architecture leaves me with the same feeling, even if it's pushing the development world to do better, has some good stories and present robust principles to build software.

The book is build around 34 chapters organised in chapters.

@pascencio
pascencio / docker-proxy-env.sh
Last active May 17, 2018 20:45
Docker Proxy Environment for Systemd
#!/bin/sh
cmd=${1}
docker_proxy_file="/etc/systemd/system/docker.service.d/http-proxy.conf"
# Installations instructions:
# sudo curl https://gist.githubusercontent.com/pascencio/c0b391832a733a9b0fedd1343cadeaab/raw/c38e2f43956668f82c0345aaaa927dfcea3c759e/docker-proxy-env.sh -o /usr/bin/docker-proxy-env && sudo chmod +x /usr/bin/docker-proxy-env
reload_docker(){
systemctl daemon-reload
systemctl restart docker
@pascencio
pascencio / nodeconfig.json
Created August 31, 2017 20:45
Configuración de un nodo de Selenium con archivo json
{
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"host": "<ip-del-nodo>",
"port": <puerto-del-nodo>,
"register": true,
"hub": "http://<ip-del-hub>:<puerto-del-hub>"
}
@sdnts
sdnts / example.md
Last active January 10, 2023 20:50
Postman pm.sendRequest example

To send a request via the sandbox, you can use pm.sendRequest.

pm.test("Status code is 200", function () {
    pm.sendRequest('https://postman-echo.com/get', function (err, res) {
        pm.expect(err).to.not.be.ok;
        pm.expect(res).to.have.property('code', 200);
        pm.expect(res).to.have.property('status', 'OK');
    });
});
@pascencio
pascencio / add_proxy.sh
Last active August 18, 2017 22:16
Configuración del proxy al iniciar terminal
# Para usar esta shell realice los siguientes pasos:
# 1.- wget https://gist.githubusercontent.com/pascencio/06ccb1d74ca555b371d04cad810bd484/raw/41cc6f84434576f6b45b88daa30dbddc11a65254/add_proxy.sh
# 2.- chmod +x add_proxy.sh
# 3.- ./add_proxy.sh
read -p "Ingrese el host del proxy: " host
reap -p "Ingrese el puerto del proxy: " port
echo export HTTP_PROXY=http://${host}:${port} >> ~/.bashrc
export HTTPS_PROXY=http://${host}:${port} >> ~/.bashrc
@pascencio
pascencio / proxyoff.sh
Last active December 19, 2017 19:49
Proxy Management on Manjaro Linux
ID=$(id -u)
PROXYON="${http_proxy}"
if [ ${ID} != 0 ] ;
then
echo "Debes ejecutar este comando como root"
else
if [ "${PROXYON}X" != "X" ] ;
then
sed -i "s/\(.*\)\(PROXY\|proxy\)\(=\)/#\1\2\3/" /etc/environment
@kingspp
kingspp / logging.py
Created April 22, 2017 07:14
Python Comprehensive Logging using YAML Configuration
import os
import yaml
import logging.config
import logging
import coloredlogs
def setup_logging(default_path='logging.yaml', default_level=logging.INFO, env_key='LOG_CFG'):
"""
| **@author:** Prathyush SP
| Logging Setup
@peterforgacs
peterforgacs / Windows10AWSEC2.md
Last active April 18, 2024 23:53
Running Windows 10 on AWS EC2

Running Windows 10 on AWS EC2

Downloading the image

Download the windows image you want.

AWS vmimport supported versions: Microsoft Windows 10 (Professional, Enterprise, Education) (US English) (64-bit only)

So Home wont work.

@juanbrujo
juanbrujo / comunas-regiones.json
Last active May 22, 2024 20:27 — forked from sergiohidalgo/comunas-regiones-chile.json
Comunas y regiones de chile JSON
{
"regiones": [
{
"region": "Arica y Parinacota",
"comunas": ["Arica", "Camarones", "Putre", "General Lagos"]
},
{
"region": "Tarapacá",
"comunas": ["Iquique", "Alto Hospicio", "Pozo Almonte", "Camiña", "Colchane", "Huara", "Pica"]
},