Skip to content

Instantly share code, notes, and snippets.

@itspluxstahre
itspluxstahre / Program.cs
Created November 17, 2023 20:29
Program.cs
using System;
class Program
{
static void Main()
{
for (int i = 1; i <= int.MaxValue; i++)
{
bool result = isEven(i);
Console.WriteLine($"Number: {i}, Is Even: {result}");
@itspluxstahre
itspluxstahre / stupid_command_runner.ps1
Last active October 24, 2023 19:03
I needed a stupid braindead way to rerun a command repeatdly if it failed or sometimes even if it succeeded to solve a.... thing.
<#
.\stupid_runner.ps1 -Command "your-command-here" -MaxRetries 5 -Delay "5s" -RerunOnSuccess
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <[email protected]>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
@itspluxstahre
itspluxstahre / tls.ps1
Created September 29, 2023 12:56
Simple script to check status of insecure TLS status on a Windows Server, and optionally change it. I've been using it to enable old TLS versions on servers due to legacy software.
# Function to set the TLS registry keys
function Set-TLSKeys {
param (
[int] $enabledValue,
[int] $disabledByDefaultValue
)
$protocols = @('TLS 1.0', 'TLS 1.1')
$roles = @('Server', 'Client')
SELECT
[email].[id]
,CASE
WHEN [TED_CI].[email] IS NULL
THEN NULL
WHEN
CHARINDEX(' ',LTRIM(RTRIM([TED_CI].[email]))) = 0
AND LEFT(LTRIM([TED_CI].[email]),1) <> @
AND RIGHT(RTRIM([TED_CI].[email]), 1) <> '.'
AND CHARINDEX('.', [TED_CI].[email] ,CHARINDEX('@',[TED_CI].[email])) - CHARINDEX('@', [TED_CI].[email]) > 1
@itspluxstahre
itspluxstahre / TicTacToe.ps1
Last active April 11, 2023 20:43
Stupid TicTacToe in Powershell.
<#
.SYNOPSIS
A simple PowerShell script to play Tic Tac Toe against the computer.
.DESCRIPTION
The script creates a 3x3 Tic Tac Toe board and allows the user to play against the computer. The computer will make
optimal moves to win or block the player's winning moves.
#>
# Display-Board function
<#

Keybase proof

I hereby claim:

  • I am itspluxstahre on github.
  • I am itsplux (https://keybase.io/itsplux) on keybase.
  • I have a public key ASAiQ3gw6geunnLj61qPU8jH1B9QZuvKYsqN3K575e6bbQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am itspluxstahre on github.
  • I am itsplux (https://keybase.io/itsplux) on keybase.
  • I have a public key whose fingerprint is 1EFC E373 E49E 3A9D 4E6C BE29 F968 A1F9 C030 BE1A

To claim this, I am signing this object:

@itspluxstahre
itspluxstahre / bookmark.js
Created November 8, 2016 11:42
Save extensions from magento connect
javascript:(function(){var e=jQuery(".extension-version li").first().contents().last().text().trim();jQuery("#button-purchase-input").click(),jQuery("#connect-version-id").val(2),jQuery("#licence-agreement-checkbox").click(),jQuery("#get-extension-button-free").click();var n=jQuery("#extension-key-input").val(),t=n.replace(/.*\/([^/]*)/,"$1");window.open(n+"/"+e+"/"+t+"-"+e+".tgz")})();
@itspluxstahre
itspluxstahre / IEUseragent
Created May 17, 2016 21:39
User agent for NT 6.1 with Windows 10 upgrade waiting. :)
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; BRI/1; MAPB; InfoPath.3; .NET4.0C; .NET4.0E; BRI/2; GWX:DOWNLOADED; GWX:RESERVED; GWX:QUALIFIED; Microsoft Outlook 14.0.7169; ms-office; MSOffice 14)" "-
"https://github.com/abrt/satyr"
"https://github.com/allure-framework/allure-core"
"https://github.com/callmenick/css-loaders-spinners-2"
"https://github.com/callmenick/css-loaders-spinners-2/tree/master/js"
"https://github.com/crazed"
"https://github.com/danesparza/Pushover.NET"
"https://github.com/dyaa/Laravel-pushover"
"https://github.com/enkydu/raspi_runner"
"https://github.com/entertailion/Fling/blob/master/README.md"
"https://github.com/erniebrodeur/pushover"