Skip to content

Instantly share code, notes, and snippets.

View aetonsi's full-sized avatar
👋
Hi there!

Andrea Edin Tonsi aetonsi

👋
Hi there!
View GitHub Profile
@aetonsi
aetonsi / ANSI.md
Created January 1, 2023 21:54 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@aetonsi
aetonsi / man_get-windowsupdate
Created March 22, 2023 00:04
`man Get-WindowsUpdate` - PSWindowsUpdate 2.2.0.3
Synopsis
Get list of available updates meeting the criteria.
Description
Use Get-WindowsUpdate (aka Get-WUList) cmdlet to get list of available or installed updates meeting specific criteria.
Use Download-WindowsUpdate alias to get list of updates and download it. Equivalent Get-WindowsUpdate -Download.
Use Install-WindowsUpdate (aka Get-WUInstall) alias to get list of updates and install it. Equivalent Get-WindowsUpdate -Install.
@aetonsi
aetonsi / Get-NetFrameworkVersion.ps1
Last active May 14, 2023 16:16
Determine .NET Framework Version
$versionTable = @{
378389 = ".NET Framework 4.5"
378675 = ".NET Framework 4.5.1 installed with Windows 8.1"
378758 = ".NET Framework 4.5.1 installed on Windows 8, Windows 7 SP1, or Windows Vista SP2"
379893 = ".NET Framework 4.5.2"
393295 = ".NET Framework 4.6 installed with Windows 10"
393297 = ".NET Framework 4.6"
394254 = ".NET Framework 4.6.1 installed on Windows 10"
394271 = ".NET Framework 4.6.1"
394802 = ".NET Framework 4.6.2 installed on Windows 10 Anniversary Update and Windows Server 2016"
@aetonsi
aetonsi / poly.php
Created May 5, 2023 10:19
php-js polyglot
/* <?php
echo 'this is php // ';
if (strtolower(php_uname('s')) === 'windows nt') $node = 'node.exe';
else $node = 'node';
system("$node " . __FILE__);
__halt_compiler(); */
console.log('this is javascript */');
<?php
// https://stackoverflow.com/questions/9262109/simplest-two-way-encryption-using-php
class UnsafeCrypto
{
const METHOD = 'aes-256-ctr';
/**
* Encrypts (but does not authenticate) a message
##################################################
#Edgar the Virus Hunter - Powershell Edition v1.0#
#Author: u/MessAdmin #
##################################################
#Scan state array
$scanarray = @(
'[)...................]'
'[))..................]'
@aetonsi
aetonsi / WordPress-ping-list.txt
Created May 28, 2023 18:28 — forked from danieljwonder/WordPress-ping-list.txt
Updated & De-Duplicated WordPress Ping List Based on Codex
http://rpc.pingomatic.com
https://rpc.pingomatic.com/
http://api.feedster.com/ping
http://api.moreover.com/ping
http://api.moreover.com/RPC2
http://bblog.com/ping.php
http://blo.gs/ping.php
http://blog.goo.ne.jp/XMLRPC
http://blogs.yandex.ru/
http://blogsearch.google.ae/ping/RPC2
@aetonsi
aetonsi / win10colors.cmd
Created May 30, 2023 00:52 — forked from mlocati/win10colors.cmd
ANSI Colors in standard Windows 10 shell
@echo off
setlocal
call :setESC
cls
echo %ESC%[101;93m STYLES %ESC%[0m
echo ^<ESC^>[0m %ESC%[0mReset%ESC%[0m
echo ^<ESC^>[1m %ESC%[1mBold%ESC%[0m
echo ^<ESC^>[4m %ESC%[4mUnderline%ESC%[0m
@aetonsi
aetonsi / GithubAsVscodeRemoteRepo.user.js
Last active June 12, 2023 14:57 — forked from JustinGrote/openGithubInRemoteRepo.tampermonkey.js
Userscript to add a "Open as VSCode Remote Repository" button (as well as an event listener to do the same thing on "Comma" keypress - overwrites Github Codespaces functionality!), and a button to clone the repository locally and open it in VSCode
// ==UserScript==
// @name GitHub repo: open/clone in VSCode as a Remote Repository
// @version 0.4.1
// @description Userscript to add a "Open as VSCode Remote Repository" button (as well as an event listener to do the same thing on "Comma" keypress - overwrites Github Codespaces functionality!), and a button to clone the repository locally and open it in VSCode
// @license MIT
// @author aetonsi, Justin Grote (Heavily borrowed from Rob Garrison)
// @namespace aetonsi
// @match https://github.com/*
// @run-at document-end
// @grant none
@aetonsi
aetonsi / nvmCommands.js
Created December 19, 2023 08:24 — forked from chranderson/nvmCommands.js
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node