Skip to content

Instantly share code, notes, and snippets.

Avatar

carles san agustin carlessanagustin

View GitHub Profile
View Nginx_Cheat_Sheet.md
@carlessanagustin
carlessanagustin / VAGRANT-Cheat-Sheet.md
Last active Jun 18, 2022
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 / .my-zsh.sh
Last active Jun 3, 2022
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 / gitconfig.ini
Last active May 31, 2022
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"]
@carlessanagustin
carlessanagustin / Debconf.md
Last active May 17, 2022
For unattended installations in Debian Linux environments
View Debconf.md
@carlessanagustin
carlessanagustin / loop_over_lists.md
Last active Apr 6, 2022
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 / statuscake_ips.php
Last active Mar 14, 2022
Generate a list of StatusCake IP addresses to allow in firewall
View statuscake_ips.php
<?php
/**
* Generate a list of Status Cake Ip addresses
* To add allowed IPs to Nginx or Firewall
* from: https://www.statuscake.com/kb/knowledge-base/what-are-your-ips/
*/
$statuscake_locations_json = "https://app.statuscake.com/Workfloor/Locations.php?format=json";
$locations = json_decode(file_get_contents($statuscake_locations_json));
$output = "#STATUS CAKE IPs" . "\n";
@carlessanagustin
carlessanagustin / functions.tf
Created Jan 20, 2021
Terraform functions by example
View functions.tf
##--------------------------
## Terraform: Functions ##
##--------------------------
## Open terraform console
terraform console
#######################
## Numeric Functions ##
#######################
@carlessanagustin
carlessanagustin / win2ix.md
Last active Feb 24, 2022
Windows and Unix command line equivalents
View win2ix.md
Windows command Unix command Notes
set env Set on Windows prints a list of all environment variables. For individual environment variables, set is the same as echo $ on Unix.
set Path export $PATH Print the value of the environment variable using set in Windows.
set PROJ -- result: PROJ=c:\project
echo %PROJ% echo $PROJ result: c:\project

|