Skip to content

Instantly share code, notes, and snippets.

View gucu112's full-sized avatar

Bartlomiej Roszczypala gucu112

View GitHub Profile
@gucu112
gucu112 / Singleton.cs
Last active February 21, 2020 20:59
C# Singleton Pattern
namespace Gucu112.SingletonPattern
{
class Singleton : IDisposable
{
private static Lazy<Singleton> instance
= new Lazy<Singleton>(() => new Singleton());
private Singleton()
{
// Singleton initialized
@gucu112
gucu112 / console.spec.js
Last active March 27, 2019 12:06
Patterns and snippets that I have made while learning JavaScript back in 2016.
require('jasmine-beforeall');
describe('Console class', function () {
var intercept = require('intercept-stdout');
var Console = require('../../core/console');
var ConsoleMock = Console.getMock();
var Data = new Object();
@gucu112
gucu112 / ExampleEventFilter.xml
Created February 26, 2019 14:07
Windows Task Scheduler - Custom Event Filters
<QueryList>
<Query Id="0" Path="Microsoft-Windows-TaskScheduler/Operational">
<Select Path="Microsoft-Windows-TaskScheduler/Operational">*[System[(EventID=100)] and EventData[Data[@Name='TaskName']='\Your task name']]</Select>
</Query>
</QueryList>