Skip to content

Instantly share code, notes, and snippets.

View notetiene's full-sized avatar
💭
Hacking

Etienne notetiene

💭
Hacking
View GitHub Profile
@ausfestivus
ausfestivus / AzureRegionData.md
Last active September 18, 2025 10:55
A list of the Azure regions

List of Azure Regions

A list of all the region names and locations for Azure

Creating the list

You can recreate the list anytime using this command:

az account list-locations -o table
@plembo
plembo / you-need-spice-vdagent.md
Last active November 29, 2025 00:56
You need spice-vdagent

You need spice-vdagent

Debian or Kali Linux installed to as KVM (libvirtd) guests do not automatically have qemu-guest-agent or spice-vdagent installed. This will prevent seamless movement of the mouse cursor between the guest and host desktop in Virtual Machine Manager (requiring the use of a Ctrl-Alt to release the cursor from the guest window).

To cure this, install both qemu-guest-agent and spice-vdagent on each guest and reboot (the guests).

$ sudo apt install qemu-guest-agent
$ sudo apt install spice-vdagent
@guitarrapc
guitarrapc / ClassSingleton-DO.ps1
Last active April 9, 2025 15:26
Singleton for PowerShell class
function Main() {
$item = [Singleton]::Instance
$item -eq $null #false
$item.SingletonTarget # Singleton object GUID will return
$item.SingletonTarget # Same object
$item2 = [Singleton]::Instance # same instance
$item -eq $item2 # true
}
@nordineb
nordineb / README.md
Created October 11, 2017 14:42
userPrincipalName(UPN) Vs samAccountName

userPrincipalName(UPN) Vs samAccountName

The samAccountName is the User Logon Name in Pre-Windows 2000 (this does not mean samAccountName is not being used as Logon Name in modern windows systems). The userPrincipalName is a new way of User Logon Name from Windows 2000 and later versions. user Name part can be different for the same user like DomainName\testUser and [email protected].

SamAccountName

  • The samAccountName attribute is the user logon name used to support clients and servers from a previous version of Windows ( Pre-Windows 2000).
  • The user logon name format is : DomainName\testUser.
  • The samAccountName must be unique among all security principal objects within the domain.
  • The samAccountName should be less than 20 characters.
  • Query for the new name against the domain to verify that the samAccountName is unique in the domain.
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active December 8, 2025 13:38
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@eikes
eikes / getElementsByClassName.polyfill.js
Created April 4, 2012 08:04
Polyfill for getElementsByClassName
// Add a getElementsByClassName function if the browser doesn't have one
// Limitation: only works with one class name
// Copyright: Eike Send http://eike.se/nd
// License: MIT License
if (!document.getElementsByClassName) {
document.getElementsByClassName = function(search) {
var d = document, elements, pattern, i, results = [];
if (d.querySelectorAll) { // IE8
return d.querySelectorAll("." + search);