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 September 17, 2024 08:32
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.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@thygrrr
thygrrr / pomodoro.ps1
Last active January 28, 2024 20:49
pomodoro.ps1 - 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
@shanselman
shanselman / Microsoft.PowerShell_profile.ps1
Last active September 15, 2024 18:40
PowerShell Profile
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 September 20, 2024 23:01
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.
@LukeMathWalker
LukeMathWalker / audit.yml
Last active September 20, 2024 01:47
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){
@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active September 18, 2024 15:59
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@ethankore
ethankore / script.ahk
Last active May 25, 2023 15:10
My AutoHotKey scripts
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its speed and reliability.
WindowTitlesToToggleMinimizedAndFullScreenStates := ["Seinfeld", "13tv.co.il", "ערוץ 13", "ערוץ 12", "חדשות 13", "המסך המפוצל", "VLC"]
ProcessNamesToToggleMuteOn := ["chrome.exe", "brave.exe"]
SoundUpAndDownVolumeStep = 10
; Increase or decrease volume using a specific step
; Originally written to make the Das Keyboard Professional volume knob less annoying, making it behave like it does on MacOS
@tanyuan
tanyuan / iterm2.md
Last active May 29, 2024 10:01
📺 iTerm2 tips & tricks

iTerm2 (The awesome terminal for Mac)

Look and feel

  • Window theme: Preferences > Appearance Tab > Theme > Light/Dark
  • Show folder icon on window title: Preferences > Appearance Tab > Window: Show proxy icon in window title bar
  • Background transparancy and blur: Preferences > Profiles Tab > Window Tab > Transparency (a third) & Blur (Checked, full)
  • Color theme: Preferences > Profiles Tab > Colors Tab > Color Presets...

Window and tab title