Skip to content

Instantly share code, notes, and snippets.

View elnemesisdivina's full-sized avatar
🤪
Working from home

Ray elnemesisdivina

🤪
Working from home
View GitHub Profile
@elnemesisdivina
elnemesisdivina / main.tf
Created September 8, 2021 20:44
main terraform web server in private network instance.
################################
# This one is a DRY approach basic script for task2
# Web server in instacne in private network
#
#################################
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.0"
@elnemesisdivina
elnemesisdivina / .bashrc
Last active August 11, 2021 23:54 — forked from rickdaalhuizen90/.bashrc
Parrot Os bash theme for ubuntu
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@elnemesisdivina
elnemesisdivina / openssl_commands.md
Created March 13, 2021 05:46 — forked from Hakky54/openssl_commands.md
Some list of openssl commands for check and verify your keys

openssl 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@elnemesisdivina
elnemesisdivina / java_keytool_cheat_sheet.md
Created March 13, 2021 05:46 — forked from Hakky54/java_keytool_cheat_sheet.md
Some list of keytool commands for create, check and verify your keys

Keytool 🔐

Creation and importing

Generate a Java keystore and key pair

keytool -keystore keystore.jks -genkeypair -keyalg RSA -keysize 2048 -alias server -validity 3650 -deststoretype pkcs12 

Generate a Java keystore and key pair and include Distinguished Name as one-liner and the Extensions

# pre reqs kind on ubuntu box
-check permissions
-Kubectl
-docker on laptop/VM
reference on this page : https://kind.sigs.k8s.io/
-------------------------
instal kubectl
check here :
https://kubernetes.io/docs/tasks/tools/install-kubectl/
@elnemesisdivina
elnemesisdivina / prefs.js
Last active May 31, 2020 02:19 — forked from johnbender/prefs.js
Set up Chrome Secure Shell to handle solarized terminal colors
// Disable bold.
//open WB, then ricght click on app, slect option, then ctlr+shit+j adn copy the code on ajavscript promt terminal
term_.prefs_.set('enable-bold', false)
// Use this for Solarized Dark
term_.prefs_.set('background-color', "#002b36");
term_.prefs_.set('foreground-color', "#839496");
term_.prefs_.set('color-palette-overrides', [
'#073642',
@elnemesisdivina
elnemesisdivina / rawfilter.c
Created March 16, 2020 23:54 — forked from 2opremio/rawfilter.c
BPF test: filter tcp segments to port 80
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
#include <net/ethernet.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <arpa/inet.h>
#include <netpacket/packet.h>
@elnemesisdivina
elnemesisdivina / rawfilter.c
Created March 16, 2020 22:13 — forked from oro350/rawfilter.c
SO_ATTACH_FILTER usage
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
#include <net/ethernet.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <arpa/inet.h>
#include <netpacket/packet.h>
@elnemesisdivina
elnemesisdivina / pcapbpfc.c
Created March 16, 2020 22:13 — forked from oro350/pcapbpfc.c
BPF compiler using libpcap
#include <pcap.h>
#include <unistd.h>
int main(int argc, char **argv)
{
struct bpf_program bpfprog;
int dflag = 0;
int c;
while ((c = getopt(argc, argv, "d")) != -1) {
@elnemesisdivina
elnemesisdivina / Persona.py
Created February 12, 2020 19:25
ceracion de archivo de personas en un file
import io
class persona:
###sobrecarga de metodo init de default
def __init__(self, nombre, apellidoPaterno, edad, sexo):
self.__nombre = nombre
self.__apellidoPaterno = apellidoPaterno
self.__edad = edad
self.__sexo = sexo