Skip to content

Instantly share code, notes, and snippets.

@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")})();

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:

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:

@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
<#
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 / 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')
@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 / 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}");