Skip to content

Instantly share code, notes, and snippets.

View h3ct0rjs's full-sized avatar

Héctor F. Jiménez. S h3ct0rjs

View GitHub Profile
import time
# Define a decorator function to measure execution time
def timing_decorator(func):
def wrapper(*args, **kwargs):
start_time = time.time()
result = func(*args, **kwargs)
end_time = time.time()
execution_time = end_time - start_time
print(f"{func.__name__} took {execution_time:.2f} seconds to execute.")
h3ct0rjs /
Created September 27, 2023 01:38 — forked from ethicka/
Localhost SSL Certificate on Mac OS

🚨 2020 Update: I recommend using mkcert to generate local certificates. You can do everything below by just running the commands brew install mkcert and mkcert -install. Keep it simple!

This gives you that beautiful green lock in Chrome. I'm assuming you're putting your SSL documents in /etc/ssl, but you can put them anywhere and replace the references in the following commands. Tested successfully on Mac OS Sierra and High Sierra.

Set up localhost.conf

sudo nano /etc/ssl/localhost/localhost.conf

variable "hosted_zone_domain"{
type = string
variable "domain"{
type = string
data "aws_route53_zone" "main" {
name = var.hosted_zone_domain
private_zone = false
h3ct0rjs /
Created December 6, 2021 13:28
Uninstall Tuxera NTFS Completely.

Uninstall Tuxera NTFS Completely.

I installed the tuxera app to transfer my Backup to new macbook pro, Now after doing all I was unable to remove all the dependencies, here is one way using the cli :

For 2018 up to the latest release, run this command:

sudo /Library/Filesystems/tuxera_ntfs.fs/Contents/Resources/Support/
h3ct0rjs / config
Created November 18, 2021 04:00 — forked from pksunkara/config
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
name = Pavan Kumar Sunkara
email =
username = pksunkara
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
smtpencryption = tls

Notes about Jenkins on Docker

  • Get docker image :
docker pull jenkins/jenkins:lts-jdk11
  • play and run with jenkins using docker, command line :
h3ct0rjs / Dockerfile
Created June 20, 2021 19:43
Hugo website. e
FROM alpine as HUGO
RUN apk add --update wget
# Install Hugo.
RUN wget --quiet${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz && \
tar -xf hugo_${HUGO_VERSION}_Linux-64bit.tar.gz && \
mv hugo /usr/local/bin/hugo && \
/aws/service/canonical/ubuntu/server/18.04/stable/current/amd64/hvm/ebs-gp2/ami-id -- parameter ssm ubuntu18.04
Parameter: .../ubuntu/PRODUCT/RELEASE/stable/current/ARCH/VIRT_TYPE/VOL_TYPE/ami-id
Where the fields are as follows:
PRODUCT: server or server-minimal
RELEASE: focal, 20.04, bionic, 18.04, xenial, or 16.04
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Running build automation'
sh './gradlew build'
archiveArtifacts artifacts: 'src/index.html'
Write-Host "Are you sure you want to delete Teams Cache (Y/N)?" -ForegroundColor Yellow -NoNewLine
$challenge = Read-Host
$challenge = $challenge.ToUpper()
if ($challenge -eq "Y"){
Write-Host "[$((Get-Date).ToString("HH:mm:ss"))] Stopping Teams Processes if running" -ForegroundColor Cyan
Get-Process -ProcessName Teams -ErrorAction SilentlyContinue | Stop-Process -Force
Start-Sleep -Seconds 3
Write-Host "[$((Get-Date).ToString("HH:mm:ss"))] Teams Processes Sucessfully Stopped" -ForegroundColor Green