Skip to content

Instantly share code, notes, and snippets.

View ErickAgrazal's full-sized avatar
🎧
PEQA!

Erick Agrazal ErickAgrazal

🎧
PEQA!
View GitHub Profile
@ErickAgrazal
ErickAgrazal / coc-settings.json
Last active October 22, 2022 18:47
NeoVim Configuration
{
"suggest.autoTrigger": "always",
"coc.preferences.formatOnType": false,
"coc.preferences.jumpCommand": "edit",
"coc.preferences.rootPatterns": [
".vim",
".git",
".hg",
".projections.json"
],
@ErickAgrazal
ErickAgrazal / create_tunnel_through_bastion.sh
Last active June 3, 2020 16:56
A script that creates a tunnel to connect to a server through a bastion as a proxy.
#####################################
# Script variables ##################
#####################################
IDENTITY_FILE="~/.ssh/id_rsa"
SERVER=
SERVER_PORT=1433
PROXY_BASTION_USER=
PROXY_BASTION_SERVER=
LOCAL_PORT=14333
SSH_OPTIONS="StrictHostKeyChecking no"

Keybase proof

I hereby claim:

  • I am erickagrazal on github.
  • I am erickagrazal (https://keybase.io/erickagrazal) on keybase.
  • I have a public key ASAMUJe8mL7kHPp6oEpUduOvVu0gtx7Cvo0q0KJhAkS0uAo

To claim this, I am signing this object:

@ErickAgrazal
ErickAgrazal / cbv_multiple_forms.html
Created October 8, 2019 03:29 — forked from badri/cbv_multiple_forms.html
Django multiple forms code with sample usage
{% extends "base.html" %}
{% block content %}
<form method="post">{% csrf_token %}
{{ forms.subscription }}
<input type="submit" value="Subscribe">
</form>
<form method="post">{% csrf_token %}
{{ forms.contact }}
<input type="submit" value="Send">
@ErickAgrazal
ErickAgrazal / 1.base_networking.md
Last active July 13, 2019 22:58
Línea base de seguridad de ubuntu server

Agregar las interfaces de red usando netplan

  1. En sudo vim /etc/netplan/01-netcfg.yaml agregar lo siguiente:
network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s8:
      dhcp4: yes
 dhcp6: yes
@ErickAgrazal
ErickAgrazal / vs_code_settings.json
Last active June 12, 2022 20:07
My visual Studio code settings
{
"editor.autoIndent": "full",
"editor.cursorBlinking": "solid",
"editor.cursorSmoothCaretAnimation": true,
"editor.cursorStyle": "line",
"editor.fontFamily": "Fira Code",
"editor.formatOnPaste": false,
"editor.formatOnType": false,
"editor.fontLigatures": true,
"editor.letterSpacing": 0.1,
@ErickAgrazal
ErickAgrazal / automated_initial_server_setup_with_docker.sh
Last active February 19, 2019 17:20
Automated initial Server setup with Docker for Ubuntu server.
#!/bin/bash
set -euo pipefail
########################
### SCRIPT VARIABLES ###
########################
# Name of the user to create and grant sudo privileges
USERNAME=sammy
@ErickAgrazal
ErickAgrazal / generate_random_array.js
Last active March 28, 2021 16:36
Generate Array with Pseudo Random Numbers Generated
function generateArray(size, min=1, max=100){
/*
Pseudo Random number array generator.
@size: Length of the array that wants to be generated.
@min: Minimun value of each number generated.
@max: Maximun value of each number generated.
Example of usage:
const arr = generateArray(10);
console.log(arr);
@ErickAgrazal
ErickAgrazal / change_commit_date.sh
Last active July 7, 2023 15:40
Use git filter-branch with an env filter that sets GIT_AUTHOR_DATE and GIT_COMMITTER_DATE for the specific hash of the commit you're looking to fix.
git filter-branch --env-filter \
'if [ $GIT_COMMIT = b9230a8b64cbe283744d65b0e372616c0a9ac34c ]
then
export GIT_AUTHOR_DATE="Sat Jan 25 01:38:53 2009 -0500"
export GIT_COMMITTER_DATE="Sat Jan 25 21:01:01 2007 -0500"
fi'