Skip to content

Instantly share code, notes, and snippets.

View mswietlicki's full-sized avatar

Mateusz Świetlicki mswietlicki

View GitHub Profile
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender]
"DisableAntiSpyware"=dword:00000001
"DisableAntiVirus"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection]
"DisableBehaviorMonitoring"=dword:00000001
"DisableOnAccessProtection"=dword:00000001
"DisableScanOnRealtimeEnable"=dword:00000001
Set-MpPreference -DisableRealtimeMonitoring $true
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y ppp
sudo wget "http://raspberry-at-home.com/files/sakis3g.tar.gz"
sudo tar -xzvf sakis3g.tar.gz
chmod +x sakis3g
sudo mv sakis3g /usr/bin
sudo rm sakis3g.tar.gz
ffmpeg -i .\Nemesis_Games.m4a -f segment -segment_time 1800 -c copy "The Expanse - Nemesis Games %02d.m4a"
Set-Alias ngen (Join-Path ([System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()) ngen.exe)
[AppDomain]::CurrentDomain.GetAssemblies() |
? GlobalAssemblyCache -eq 0 |
? Location |
% { ngen install $_.Location }
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
Windows Registry Editor Version 5.00
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\shell\sublime]
@="Open Folder as &Sublime Project"
"Icon"="\"C:\\Program Files\\Sublime Text 3\\sublime_text.exe\",0"
[HKEY_CLASSES_ROOT\Directory\shell\sublime\command]
var serviceNames = new string[] { "SERVICE1","SERVICE2"};
Expression<Func<Service,bool>> inList = v => false;
var parameter = inList.Parameters[0];
var propertyExpression = Expression.Property(parameter,"ServiceName");
foreach (var serviceName in serviceNames)
{
var body = inList.Body;
var constantExpression = Expression.Constant(serviceName);
@mswietlicki
mswietlicki / AsyncExtensions.cs
Created July 30, 2013 12:52
InCompletionOrder allows you to do foreach on collection of Tasks that will process them as fast as they complete.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace Asyncfun
{
public static class AsyncExtensions
{