Skip to content

Instantly share code, notes, and snippets.

View cayu's full-sized avatar
馃懟
Escuchando metal! 馃

Cayu cayu

馃懟
Escuchando metal! 馃
View GitHub Profile
@janert
janert / hugo-survival-guide.md
Last active March 19, 2026 16:52
A Hugo Survival Guide

A Hugo Survival Guide

Hugo is a static site generator: it takes some plain-text content, marries it to a bunch of HTML templates, and produces a set of complete, static HTML pages that can be served by any generic, stand-alone web server. Simple.

Or maybe not. Hugo does a lot of things automatically, relying on conventions and implicit rules, rather than on explicit configuration. For example, it tries to match each piece of content with the most

/*
06-6-string-ROT13.c
Tratamiento de strings.
Aplica ROT13 a una cadena de caracteres.
*/
#include <stdio.h>
char rot13(char caracter);

Microsoft Defender for Endpoint does a great job of ensuring the integrity of the scripts they push and execute.

First, they ensure that the script to execute matches the expected file hash. Example:

powershell.exe -ExecutionPolicy AllSigned -NoProfile -NonInteractive -Command "& {$OutputEncoding = [Console]::OutputEncoding =[System.Text.Encoding]::UTF8;$scriptFileStream = [System.IO.File]::Open('C:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\DataCollection\7910.6064030.0.6552433-3a7d9fb541a03fc183f740777b7bb1aa20a20efd\046a3caf-d9ec-4da6-a32a-fb148992596a.ps1', [System.IO.FileMode]::Open, [System.IO.FileAccess]::Read, [System.IO.FileAccess]::Read);$calculatedHash = Get-FileHash 'C:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\DataCollection\7910.6064030.0.6552433-3a7d9fb541a03fc183f740777b7bb1aa20a20efd\046a3caf-d9ec-4da6-a32a-fb148992596a.ps1' -Algorithm SHA256;if (!($calculatedHash.Hash -eq 'd871ab44a81b93cdf3c7e235c246ea8b4bf65d9141d7797270c15dd6bbdb2803'))
@ruanbekker
ruanbekker / k3s-demo-with-cluster.md
Created September 27, 2019 15:29
kubernetes demo with cluster mode on k3s

Install k3s on master node:

curl -sfL https://get.k3s.io | sh -
# get token
cat /var/lib/rancher/k3s/server/node-token

Install k3s on worker nodes as agents:

Notes

Enumeration

Scan IPs to a CSV file:

cd /mnt/hgfs/Shared/Exam
mkdir hosts
ruby scan.rb tcp 10.11.1.220 10.11.1.221 10.11.1.44 10.11.1.218 10.11.1.219
ruby scan.rb udp 10.11.1.220 10.11.1.221 10.11.1.44 10.11.1.218 10.11.1.219
@atiti
atiti / hp1920-get-config.sh
Last active January 12, 2024 15:20
Download running config from a HP 1920S switch
#!/bin/bash
#
# Simple script to download the running configuration from the HP 1920S switch
# through the HTTP "APIs"
#
# Run it as:
# $ ./hp1920-getconfig.sh --host="10.1.2.3" --user="admin" --pass="hello" --file=startup-config
#
# Attila Sukosd <attila@airtame.com>
#
@silviaclaire
silviaclaire / app.py
Last active August 11, 2023 19:37
Collapsible Tree Diagram using Flask and d3.js
import csv
import json
from flask import Flask, render_template
# reference: https://stackoverflow.com/questions/29631711/python-to-parent-child-json
# create a helper class for each tree node
class Node(object):
# generate new node
def __init__(self, cluster):