MIT Licence
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to
the following conditions: The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This gist demonstrated how you can configure NuGet source without storing the credentials in plaintext on the disc | |
# We enable this by only storing references to environment variables into the NuGet configuration (%NUGET_USERNAME%) | |
name: Configure NuGet source on private GitHub package repository | |
jobs: | |
build: | |
env: | |
NUGET_USERNAME: ${{ secrets.NUGET_USERNAME }} #Needs to be the user associated with the personal access token (PAT) | |
NUGET_PATTOKEN: ${{ secrets.NUGET_PATTOKEN }} #PAT only needs the read:packages scope | |
NUGET_GITHUB_ORGANISATION: ${{ github.repository_owner }} #Name of the organization where the feed is stored |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\SWD\MMDEVAPI\{0.0.1.00000000}.{f59573dc-ac67-4ee2-9437-b754d9648217}] | |
"FriendlyName"="Mikrofon (Logitech C930c)" | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_046D&PID_0891&MI_00\9&1dbb0716&0&0000] | |
"FriendlyName"="Logitech C930c" | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_046D&PID_0891&MI_02\9&1dbb0716&0&0002] | |
"FriendlyName"="Logitech C930c" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on https://gallery.technet.microsoft.com/scriptcenter/Get-FileMetaData-3a7ddea7 | |
function Get-FileMetaData | |
{ | |
<# | |
.SYNOPSIS | |
Get-FileMetaData returns metadata information about a single file. | |
.DESCRIPTION | |
This function will return all metadata information about a specific file. It can be used to access the information stored in the filesystem. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#based on http://www.andrewconnell.com/blog/Converting-all-your-non-MP3-files-to-MP3s-with-VLC-PowerShell-and-TagLib | |
#don't worry if there are errors shown in VLC this is perfectly fine. | |
#there isn't any progress shown. Simply wait for completion. | |
function ConvertToMp3 ($inputObject, [switch]$isRemoveOldFile = $false) | |
{ | |
$vlc = "C:\Program Files\VideoLAN\VLC\vlc.exe" | |
$codec = 'mp3'; | |
$oldFile = $inputObject; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
insert into sym_load_filter (load_filter_id, load_filter_type, handle_error_script, source_node_group_id, target_node_group_id, create_time, last_update_time) | |
values | |
('unqiue_error_fixer', 'BSH', '', 'central', 'mobil', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP) | |
update sym_load_filter set last_update_time = CURRENT_TIMESTAMP, handle_error_script = | |
' | |
//this deletes the conflicting row, so that it can insert the incoming row | |
import java.util.regex.Pattern; | |
import java.util.regex.Matcher; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- The following statements are from multiple sources | |
-- I'm not exactly sure where each one is coming from | |
-- Created it a few years ago, and refound it deep on my hd | |
-- Web sources must be: | |
-- blog.sqlauthority.com, www.brentozar.com | |
-- And books like: | |
-- "SQL Performance Explained", "SQL Server Query Performance Tuning Distilled" | |
-- "Professional SQL Server 2008 Internals and Troubleshooting", "SQL Tuning", etc. | |
with fragments as (SELECT dbschemas.[name] as 'Schema', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Sequential GUID generation for MS SqlServer (2005+) | |
-- Can be used in DEFAULT expression | |
-- idea based on http://www.codeproject.com/Articles/388157/GUIDs-as-fast-primary-keys-under-multiple-database | |
-- helper view required due to usage limitations of crypt_gen_random inside UDF | |
CREATE VIEW dbo.RandomBytesForSequentialGuidHelperView | |
AS | |
SELECT CRYPT_GEN_RANDOM(10) randomResult | |
GO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Sequential GUID generation for SQLite (3.8.3 or greater) | |
-- Can be used in DEFAULT expression (remember to suround with "()" ) | |
-- see http://www.codeproject.com/Articles/388157/GUIDs-as-fast-primary-keys-under-multiple-database | |
select | |
substr(printf('%014X', (strftime('%s', 'now') * 1000 + substr(strftime('%f','now'), 4, 3))), 3, 8) | |
|| '-' | |
|| substr(printf('%014X', (strftime('%s', 'now') * 1000 + substr(strftime('%f','now'), 4, 3))), 11, 4) | |
|| '-' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Small snipped to transform a ServiceException into a SoapException if called from a SoapClient. | |
* So you don't have to check the ReturnCode value of ResponseStatus for errors. | |
* Feel free to use, edit, share, improve this one. | |
*/ | |
using System.ServiceModel; | |
public override void Configure(Funq.Container funq) | |
{ |