Skip to content

Instantly share code, notes, and snippets.

0x6e085c5b38b9098e38c3a21c4fdea435aa394aca
@mxmauro
mxmauro / prepare_v8.vbs
Created April 14, 2020 15:05
Easily download and compile V8 engine on Windows
'Copyright 2020, Mauro H. Leggieri
'
'Permission is hereby granted, free of charge, to any person obtaining a copy of
'this software and associated documentation files (the "Software"), to deal in
'the Software without restriction, including without limitation the rights to
'use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
'of the Software, and to permit persons to whom the Software is furnished to do
'so, subject to the following conditions:
'
'The above copyright notice and this permission notice shall be included in all
const crypto = require('crypto');
const util = require('util');
const assert = require('assert');
//------------------------------------------------------------------------------
const ITERATIONS = 1000;
const SALT_LENGTH = 32;
const IV_LENGTH = 16;
const GCM_AUTH_TAG_LENGTH = 16;
@mxmauro
mxmauro / adding-gpg-keys.md
Created March 9, 2022 11:48
How to sign git tags and commits

How to sign git tags and commits

The following step-by-step guide will assist you to start pushing signed commits and create signed tags. This is a quick-start guide. For more details, you can visit here and here.

There some topics to take into account on why we decided to follow a specific approach on certificate management:

  • GitHub does not handle master certificates revocation but the community seems to not care about this because the purpose of these certificates is to demostrate to others that you are you and not other person impersonating you. If your certificate expires or is stolen, you simply create a new one and upload it to GitHub. Because GitHub also verifies the email address, a thief must also gain to your account in order to be able to use it.
  • Using subkeys is preferable but updating them and GitHub periodically can become a pa
@mxmauro
mxmauro / update_go_deps.vbs
Created July 5, 2022 14:13
Update all application Go dependencies on Windows
'Run CSCRIPT update_go_deps.vbs in the folder containing your application source code
Option Explicit
Dim oShell
Dim S, Lines, Values
Set oShell = CreateObject("Wscript.Shell")
S = RunAndCapture("go list -mod=readonly -f " & Chr(34) & "{{.Path}}|{{.Indirect}}|{{.Main}}" & Chr(34) & " -m -u all")
Lines = Split(Replace(S, Chr(10), Chr(13)), Chr(13))
@mxmauro
mxmauro / GITHUB_APP.md
Created February 13, 2024 14:08
Using custom GitHub application to enhance GitHub actions

Using custom GitHub application to enhance GitHub actions

Application creation

  1. Go to your GitHub company's profile settings: https://github.com/organizations/{company name}/settings/profile
  2. Under developer settings on the left side menu, click on GitHub Apps.
  3. Click on New GitHub App buttton.
  4. Enter the application name, homepage url, disable webhook unless you need it.
  5. Set up repository access permissions. For e.g., read only access to Content, Packages and Metadata.
  6. Set up organization access permissions. For e.g., read only access to Members.
# Update CloudFlare DNS record within MikroTik router
# (C) Mauro H. Leggieri 2024
# MIT License
#
# CloudFlare settings
:local cfZoneID "####"
:local cfDnsRecordID "####"
:local cfApiToken "####"
;local subDomain "{subdomain}"
;local fullDomain "$subDomain.{top-level-domain}"