Skip to content

Instantly share code, notes, and snippets.

Avatar

the-nose-knows

View GitHub Profile
View colors.bat
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
View move_uwp_stuff_faster.cs
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;
View rescap_test.csproj
<?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>
View rescap_main_page_xaml.cs
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 Aug 2, 2019
Restricted Cap package manifest
View rescap_manifest.xml
<?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 Mar 30, 2019
Fetch Upstream Changes to your personal Fork from the original repo for HTTPS
View https_git_github_fetch_upstream_changes.md
@the-nose-knows
the-nose-knows / mixed_proj.sln.metaproj
Created Mar 26, 2019
A metaproj file generated when using MSBuildEmitSolution=1
View mixed_proj.sln.metaproj
<?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 Oct 19, 2018
Adding WinRT to a Visual C++ 17 project in Visual Studio
View AddWinRTToCpp17Projects.md

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-
View deepspeech_output.txt
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 Feb 18, 2020
Winapi ServiceRunning Query
View service_running.cpp
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)
{
You can’t perform that action at this time.