Skip to content

Instantly share code, notes, and snippets.

View BobToninho's full-sized avatar
🐘

Roberto Tonino BobToninho

🐘
View GitHub Profile
@thesamesam
thesamesam / xz-backdoor.md
Last active June 8, 2025 01:04
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background

@vanvuvuong
vanvuvuong / aws_regex_cheat_sheet.md
Last active February 12, 2025 18:34 — forked from rams3sh/aws_regex_cheat_sheet
AWS ARN resources regex cheat sheet

ARN Base Pattern

arn:<aws_parition>:<aws_service>:[<aws_region>]:<account_id>:<root | resource_type>:/<resource_name>[/<sub_resource_names>...]

i.<aws_partition>

Regex: (aws|aws-us-gov|aws-cn)

ii. <aws_service> - No fixed pattern:

@thygrrr
thygrrr / pomodoro.ps1
Last active November 6, 2024 10:12
Powershell Pomodoro Timer, locks the workstation when timer expires
# SPDX-License-Identifier: Unlicense
if ($args.count -eq 0)
{
write-host "Pomodoro Timer that locks the workstation (screen) when done."
write-host "Usage: pomodoro.ps1 <minutes> ['activity']"
write-host "Example: pomodoro.ps1 5 try out new script"
Exit
}
# Select default activity if none is specified, otherwise concat all optional arguments
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
@sindresorhus
sindresorhus / esm-package.md
Last active June 14, 2025 11:55
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@TheSherlockHomie
TheSherlockHomie / RenewExpiredGPGkey.md
Created January 3, 2021 16:36
Updating expired GPG keys and backing them up 🔑🔐💻

Updating expired GPG keys and their backup 🔑🔐💻

I use a GPG key to sign my git commits.

An error like this one might be a sign of an expired GPG key.

error: gpg failed to sign the data fatal: failed to write commit object
@LukeMathWalker
LukeMathWalker / audit.yml
Last active June 7, 2025 07:16
GitHub Actions - Rust setup
name: Security audit
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
@j-iNFINITE
j-iNFINITE / folder_organize.ps1
Last active July 27, 2021 21:09
powershell script for organize files in a folder,according to the year, month, day and extension
$path = "your folder path"
Set-Location $path
foreach ($file in (get-childitem $path | where { ! $_.PSIsContainer } ))
{
$year=$file.CreationTime.Year
$month=$file.CreationTime.Month
$day=$file.CreationTime.Day
$ext=($file.Extension).Trim(".")
$newpath=$path,$year,$month,$day,$ext -Join "\"
if (Test-Path $newpath){