Skip to content

Instantly share code, notes, and snippets.

REM If you need to manually replace the ESC special character, make sure Num Pad is enabled, then Left-Alt + numpad0 + numpad2 + numpad7
for /L %%I IN (1,1,3) DO (
echo Black
echo Red
echo Green
echo Yellow
echo Blue
echo Magenta
echo Cyan
echo White
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using Windows.Storage;
using System.IO;
using Microsoft.Win32;
using Microsoft.Win32.SafeHandles;
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{82C838EF-6CCD-4A61-88F3-A43A728BC28C}</ProjectGuid>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>rescap_test</RootNamespace>
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
@the-nose-knows
the-nose-knows / rescap_manifest.xml
Created August 2, 2019 21:19
Restricted Cap package manifest
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap mp rescap">
<Identity
@the-nose-knows
the-nose-knows / https_git_github_fetch_upstream_changes.md
Last active March 30, 2019 01:39
Fetch Upstream Changes to your personal Fork from the original repo for HTTPS
@the-nose-knows
the-nose-knows / mixed_proj.sln.metaproj
Created March 26, 2019 21:18
A metaproj file generated when using MSBuildEmitSolution=1
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" InitialTargets="ValidateSolutionConfiguration;ValidateToolsVersions;ValidateProjects" DefaultTargets="Build">
<PropertyGroup>
<MSBuildExtensionsPath32>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild</MSBuildExtensionsPath32>
<MSBuildExtensionsPath>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild</MSBuildExtensionsPath>
<MSBuildToolsPath32>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin</MSBuildToolsPath32>
<MSBuildToolsPath64>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\amd64</MSBuildToolsPath64>
<MSBuildSDKsPath>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks</MSBuildSDKsPath>
<FrameworkSDKRoot>C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\</FrameworkSDKRoot>
<MSBuildRuntimeVersion>4.0.30319</MSBuildRuntimeVe
@the-nose-knows
the-nose-knows / AddWinRTToCpp17Projects.md
Created October 19, 2018 21:11
Adding WinRT to a Visual C++ 17 project in Visual Studio

Adding WinRT to a Visual C++ 17 project in Visual Studio

  1. Open the project's Properties panel
  2. Go to the C++ section, then Commandline
  3. Add this for all platforms and configurations: /Zc:twoPhase-
C:\_gh\DeepSpeech-master\DeepSpeech-master>python --version
Python 3.6.6
C:\_gh\DeepSpeech-master\DeepSpeech-master>pip --version
pip 18.0 from c:\program files\python36\lib\site-packages\pip (python 3.6)
C:\_gh\DeepSpeech-master\DeepSpeech-master>pip install deepspeech
Collecting deepspeech
Could not find a version that satisfies the requirement deepspeech (from versions: )
@the-nose-knows
the-nose-knows / service_running.cpp
Last active September 28, 2021 20:13
Winapi ServiceRunning Query
static bool service_running( std::wstring token )
{
SC_HANDLE scm = OpenSCManager(NULL, SERVICES_ACTIVE_DATABASE, SC_MANAGER_CONNECT);
if (scm == NULL)
return false;
LPCWSTR lpServiceName = (LPCWSTR)token.data();
SC_HANDLE hService = OpenService(scm, lpServiceName, GENERIC_READ);
if (hService == NULL)
{