Skip to content

Instantly share code, notes, and snippets.

View curious-username's full-sized avatar

Ben-Jammin curious-username

View GitHub Profile
Get-Process -IncludeUserName | Select-Object -Unique | Where-Object {$_.UserName -notlike 'NT AUTHORITY\SYSTEM' -and $_.UserName -notlike 'NT AUTHORITY\NETWORK SERVICE' -and $_.UserName -notlike 'NT AUTHORITY\LOCAL SERVICE'} | Format-Table -Wrap -AutoSize
@curious-username
curious-username / readme.txt
Created April 19, 2023 05:43
another readme
$UpdateSession = New-Object -ComObject Microsoft.Update.Session
$UpdateSearcher = $UpdateSession.CreateUpdateSearcher()
$SearchResult = $UpdateSearcher.Search("IsInstalled=0 and Type='Software'")
if ($SearchResult.Updates.Count -eq 0) {
Write-Output "No updates available"
} else {
$UpdatesToInstall = New-Object -ComObject Microsoft.Update.UpdateColl
foreach ($Update in $SearchResult.Updates) {
$UpdatesToInstall.Add($Update)

$ComputerName = $env:COMPUTERNAME $LoggedOnUsers = Get-WmiObject -Class Win32_LoggedOnUser -ComputerName $ComputerName

foreach ($User in $LoggedOnUsers) { $Domain = $User.Antecedent.Split('"')[1] $UserName = $User.Antecedent.Split('"')[3] $Groups = Get-ADPrincipalGroupMembership -Identity "$Domain$UserName" -ErrorAction SilentlyContinue | Select-Object Name

Write-Output "$Domain\$UserName"

Learning C

Topic: Introduction to C Programming

Book: "C Programming Absolute Beginner's Guide (3rd Edition)" by Greg Perry and Dean Miller Objectives: Learn about the basics of C programming, including syntax, data types, and control flow. Practice writing simple C programs to understand the fundamental concepts.

Topic: C Programming Basics

private void Awake()
{
_playerControls = new PlayerInputActions();
_bearAnim = GetComponent<Animator>();
}
private void OnEnable()
{
_movementActions = _playerControls.BearMovement.BearWalk;
_movementActions.Enable();
private void Awake()
{
_playerControls = new PlayerInputActions();
_bearAnim = GetComponent<Animator>();
}
private void OnEnable()
{
_movementActions = _playerControls.BearMovement.BearWalk;
_movementActions.Enable();
Vector2 _bearMovement;
Animator _bearAnim;
PlayerInputActions _playerControls;
InputAction _movementActions;
InputAction _switchActionMap;
InputAction _RecoverActions;
if (Input.GetKeyDown(KeyCode.A))
{
Debug.Log("Adding v2: " + _greenCube.transform.position);
_greenCube.transform.position += v2;
}
else if (Input.GetKeyDown(KeyCode.S))
{
Debug.Log("Subtracting v2: " + _greenCube.transform.position);
_greenCube.transform.position -= v2;
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Cinemachine;
public class CameraSwap : MonoBehaviour
{
[SerializeField]
private CinemachineVirtualCamera[] cinemachineVirtualCameras;
private int _count = 0;
@curious-username
curious-username / POV.cs
Last active March 12, 2022 23:01
Basic Camera Movement
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Cinemachine;
public class POV : MonoBehaviour
{
[SerializeField]
CinemachineVirtualCamera[] CameraController;
Transform overviewCameraTransform;