Skip to content

Instantly share code, notes, and snippets.

Avatar

carles san agustin carlessanagustin

View GitHub Profile
View Nginx_Cheat_Sheet.md
@carlessanagustin
carlessanagustin / conf.py
Last active February 6, 2023 14:33
How to send an email with attached text file via Python script?
View conf.py
# 1 FOR TESTING PURPOSES ONLY!!!
debuglevel = 1
# file format to send
pattern = '.txt'
# files to sent path
path = 'path = ‘/path/where/files/to/send/'
# delete file after sending?
delete_files = False
@carlessanagustin
carlessanagustin / .my-zsh.sh
Last active February 3, 2023 07:46
Personal zshrc: alias and sh functions
View .my-zsh.sh
########## START
RED=$'\e[0;31m'
R=${RED}
BLUE=$'\e[0;34m'
B=${BLUE}
GREEN=$'\e[0;32m'
G=${GREEN}
CYAN=$'\e[0;36m'
C=${CYAN}
YELLOW=$'\e[0;33m'
@carlessanagustin
carlessanagustin / lists-dictionary.yml.md
Last active December 15, 2022 17:15
Lists & Dictionary YAML Syntax by example
@carlessanagustin
carlessanagustin / functions.tf
Created January 20, 2021 16:34
Terraform functions by example
View functions.tf
##--------------------------
## Terraform: Functions ##
##--------------------------
## Open terraform console
terraform console
#######################
## Numeric Functions ##
#######################
@carlessanagustin
carlessanagustin / troubleshooting-memory.md
Created November 17, 2015 11:33
Troubleshooting linux MEMORY usage
View troubleshooting-memory.md

Troubleshooting linux MEMORY usage

This entry will hopefully show you how to troubleshoot memory used by Linux and application.

Linux System Memory usage

Display amount of free and used memory in the system (-m = in megas)

$ free -m

total used free shared buffers cached

@carlessanagustin
carlessanagustin / loop_over_lists.md
Last active November 18, 2022 17:30
ANSIBLE: Loop over 2 lists
View loop_over_lists.md
  • playbook test.yml
---
- hosts: localhost
  gather_facts: no
  connection: local

  vars:
    type: st1
@carlessanagustin
carlessanagustin / AdminProductsController.php
Last active November 3, 2022 19:54
Adding a new column to Prestashop 1.6 admin product list. Changes are indicated with "START: carlessanagustin.com" and "END: carlessanagustin.com". 2 files included in this Gist.
View AdminProductsController.php
<?php
/*
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
@carlessanagustin
carlessanagustin / VAGRANT-Cheat-Sheet.md
Last active September 22, 2022 12:48
This is a VAGRANT cheat sheet
View VAGRANT-Cheat-Sheet.md

Vagrant Cheat Sheet

add image

local

$ vagrant box add {title} {url}
$ vagrant init {title}
$ vagrant up
@carlessanagustin
carlessanagustin / gitconfig.ini
Last active May 31, 2022 07:52
My personal .gitconfig file
View gitconfig.ini
[user]
name = Example Name
email = example@example.com
[http]
sslVerify = false
[push]
default = current
[color]
ui = auto
[color "branch"]