Skip to content

Instantly share code, notes, and snippets.

@eegeeZA
eegeeZA / alienware-arena_daily-quests.user.js
Last active June 30, 2021 15:56
Alienware Arena - Daily Quests
// ==UserScript==
// @name Alienware Arena - Daily Quests
// @match https://*.alienwarearena.com/*
// @icon https://eu.alienwarearena.com/favicon.ico
// @version 1.1
// @author eegee
// @download https://gist.github.com/eegeeZA/823491a8883f2eb0296f4122fe632122/raw/alienware-arena_daily-quests.user.js
// @namespace https://gist.github.com/eegeeZA/823491a8883f2eb0296f4122fe632122
// @description Quick link to thread or solution of the Daily Quest.
// ==/UserScript==
@eegeeZA
eegeeZA / MediaHelper.ahk
Last active January 2, 2024 12:20
Remap original hotkeys from Winamp to media keys, disable the annoying CaPS LoCK button, allow the volume to be adjusted with the mouse wheel, and quick launch a calculator using Num Lock.
#Requires AutoHotkey v2.0
SetCapsLockState "AlwaysOff"
Media_Play_Pause::Media_Play_Pause
Media_Stop::Media_Stop
Media_Next::Media_Next
Media_Prev::Media_Prev
^!Home::Send "!{Media_Play_Pause}"
@eegeeZA
eegeeZA / pseudoloc-xliff.js
Created June 19, 2020 11:20
Pseudo-Locales for XLIFF (*.xlf) files using pure JavaScript on Node/NPM
/**
* Pseudo-Locales for XLIFF (*.xlf) files using pure JavaScript on Node/NPM
*
* Inspired by https://docs.microsoft.com/en-us/windows/win32/intl/pseudo-locales for use in Angular i18n.
* The output file will be $SOURCE_FILE_NAME.qps-Ploc.$SOURCE_FILE_EXT compatible with Angular's format.
*
* Usage:
* npm i -D pseudoloc
* node $LOCATION/pseudoloc-xliff.js $SOURCE_FILE
*
@eegeeZA
eegeeZA / new-table-template.sql
Created March 25, 2020 06:48
MS SQL template for creating new tables
-- GUID as ID
CREATE TABLE [dbo].[TableName1]
(
[PrimaryKeyName] UNIQUEIDENTIFIER NOT NULL
CONSTRAINT [PK_dbo.TableName1] PRIMARY KEY CLUSTERED
CONSTRAINT [DF_dbo.TableName1_PrimaryKeyName] DEFAULT NEWSEQUENTIALID(),
[ForeignKeyName] UNIQUEIDENTIFIER NOT NULL
CONSTRAINT [FK_dbo.TableName1_dbo.TableName2_ForeignKeyName] FOREIGN KEY ([ForeignKeyName])
REFERENCES [dbo].[TableName2] ([TableName2ColumnName]),
-- IsActive BIT NOT NULL,
@eegeeZA
eegeeZA / azure-pipelines.yml
Created March 19, 2020 06:22
Azure Pipeline example for .NET Core + NPM
trigger:
batch: true
branches:
include:
- develop
- release/v*
- hotfix/v*
- master
pool:
@eegeeZA
eegeeZA / fix_generated_constraint.sql
Last active January 21, 2020 10:41
Helper scripts to rename different types of T-SQL constraint names. Especially useful for fixing generated names across environments.
-- rename DEFAULT constraints --
DECLARE @sql NVARCHAR(MAX) = N''
SELECT @sql +=
-- SELECT
N'exec sp_rename ' + QUOTENAME(schemas.name + '.' + sys.default_constraints.name) + ', ''DF_' + sys.tables.name + '_' +
sys.all_columns.name + ''';'
FROM sys.all_columns
INNER JOIN sys.tables ON all_columns.object_id = tables.object_id
INNER JOIN sys.schemas ON tables.schema_id = schemas.schema_id
INNER JOIN sys.default_constraints ON all_columns.default_object_id = default_constraints.object_id
@eegeeZA
eegeeZA / add_bitbucket_minimize.js
Last active February 1, 2023 08:16
Add a button to minimize the contents of a file in Bitbucket pull requests
(() => {
const fileHeading = $(".diff-container .heading").find(".aui-buttons:first");
const minimizeButton = $("<button>").addClass('aui-button').text('Minimize');
minimizeButton.click(function (element) {
const fileContents = $(element.target).closest('div.diff-container').find(".diff-content-container");
fileContents.toggle();
});
fileHeading.append(minimizeButton);
@eegeeZA
eegeeZA / process_gitflow.ps1
Last active October 4, 2022 07:38
Add to your Azure Pipelines (VSTS) task for closing your `release` and `hotfix` branches as per GitFlow recommendations
# Variables
$repoURL = "git@ssh.dev.azure.com:v3/example/example/example" # or "https://dev.azure.com/example/example/_git/example"
$sourceBranch = ("$env:BUILD_SOURCEBRANCH" -replace "refs/heads/")
$tagName = ($sourceBranch -replace ".*/(v.*)", '$1') # or $(Get-Date -Format yyy-MM-dd)
$userEmail = "email@example.com"
$userName = "Example"
Write-Host "##[debug] repoURL: $repoURL"
Write-Host "##[debug] sourceBranch: $sourceBranch"
Write-Host "##[debug] tagName: $tagName"
Write-Host "##[debug] userEmail: $userEmail"
@eegeeZA
eegeeZA / chocolatey.ps1
Last active January 2, 2024 13:02
Chocolatey configuration for a new Windows setup
# Run as admin (https://chocolatey.org/install)
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
## Common
choco install 7zip.install -y
choco install adb --version 33.0.3 -y
choco install adobereader -y --pin
choco install anydesk.install -y
choco install chocolateygui -y --params='/ShowConsoleOutput /DefaultToDarkMode /DefaultToTileViewForLocalSource=$false'
choco install discord.install -y --pin
@eegeeZA
eegeeZA / PetrolReminder.ics
Last active March 22, 2019 16:51
A reminder to top-up the petrol tank before the month's cycle closes
BEGIN:VCALENDAR
BEGIN:VEVENT
DTSTART:20190327
DTEND:20190327
RRULE:FREQ=MONTHLY;WKST=MO;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-3
SUMMARY:Petrol Card
END:VEVENT
END:VCALENDAR