Skip to content

Instantly share code, notes, and snippets.

View 1RedOne's full-sized avatar

Stephen Owen 1RedOne

View GitHub Profile
@1RedOne
1RedOne / Readme.md
Created May 1, 2024 19:18
Mining Safety

Surviving in mines


Resources

Interesting stuff - 56 The ways out of the mine should already be clearly marked to meet the requirements of regulation 3 of The Mines (Safety of Exit) Regulations 1988.

@1RedOne
1RedOne / game.js
Created November 9, 2023 15:37
Basic Ball Bouncing on Grid example in phaser 3
function preload() {
this.load.image('ball', 'bullet.png');
this.load.image('tile', 'turret.jpeg');
}
function addBall(physics, tilesGroup, x, y, color) {
var ball1 = physics.add.sprite(x, y, 'ball');
ball1
.setScale(0.1)
.setBounce(1)
@1RedOne
1RedOne / setIcon.sh
Created March 3, 2023 15:49
Good work around to have Windows style Profile icons for the Edge Browser
# prereq, install Edge and ALSO Edge Dev
# in Edge, sign in with your normal profile
# in Edge Dev, sign in with your work profile
# then download the thumbnail / profile icon you want for both
# finally, install fileIcon
#to run as a cronJob (like a Windows scheduled task)
# run 'sudo crontab -e'
# add this line to the top
# 45 * * * * /Library/temp/setIcons.sh >> /Users/Stephen/iconSetLog.log
@1RedOne
1RedOne / CreateVm.cs
Created January 18, 2023 14:28
Azure.ResourceManager Create VM with new nic example.cs
using Azure;
using Azure.Core;
using Azure.ResourceManager;
using Azure.ResourceManager.Compute;
using Azure.ResourceManager.Compute.Models;
using Azure.ResourceManager.Network;
using Azure.ResourceManager.Network.Models;
using Azure.ResourceManager.Resources;
namespace AutoManageTest
scary, fear, fnaf, freddies, huggy wuggy, cursed thomas, choo choo charles, darwin awards, Trollface Quest: Horror, FNaF: Sister Location Custom Night, MOMO, Escape from Ayuwoki, The Secret of the Necromancer, Five Nights at Freddy's, Slenderman Must Die: Silent Streets,jumpscare
@1RedOne
1RedOne / Update-SubLibVm.ps1
Created April 19, 2022 13:58
A script to update sublib VMs
Import-Module Az.Accounts
Import-Module Az.Automation
Import-Module Az.Compute
<#
.DESCRIPTION
A runbook to iterate through VMs in this Sublib and tell them to patch, if they don't have a 'DontPatch' tag
.NOTES
AUTHOR: Stephen Owen
@1RedOne
1RedOne / Get-OfficeFileInfo.ps1
Created July 21, 2021 15:48
Get Office File Info In PowerShell
#https://stackoverflow.com/questions/34336486/get-file-last-saved-by-property-without-changing-it
function Get-OfficeFileInfo($filePath){
if ($filePath -like "*.doc*"){
Get-WordFileInfo $filePath
}
else{
Get-ExcelFileInfo $filePath
}
}
@1RedOne
1RedOne / ConvertTo-StringData.ps1
Last active June 30, 2021 18:25
ConvertTo-StringData - Converting a complex object into StringData
Function ConvertTo-StringData($object, $propertyOverride){
$fields = $object | get-member -MemberType NoteProperty
foreach($field in $fields){
if (IsArray($field)){
OutputArrayMember -object $object -field $field
}
else{
OutputMember -object $object -propertyName $field.name -propertyOverride $propertyOverride
}
@1RedOne
1RedOne / NewUserUI.ps1
Created March 26, 2021 15:29
Stack Answer 66817943
##Setting Static Information
$primaryTelexNumber = "1"
$telexNumber = "7"
##Get Users First Name
[string] [Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
$title = "AD New User Script: First Name"
$msg = "Please Enter the new User's First Name"
$FirstName = [Microsoft.VisualBasic.Interaction]::InputBox($msg, $title)
@1RedOne
1RedOne / githubLink.html
Created March 18, 2021 17:30
Github Report Issue Link