Skip to content

Instantly share code, notes, and snippets.

{
"homepage": "https://iobureau.com/byenow/",
"version": "0.2",
"url": "https://iobureau.com/byenow/byenow-0.2.zip",
"architecture": {
"32bit": {
"bin": "32-bit/byenow.exe"
},
"64bit": {
"bin": "64-bit/byenow.exe"
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.Extensions.DependencyModel;
using Microsoft.Extensions.DependencyModel.Resolution;
namespace TestDependencyModel
{
class Program
@devhawk
devhawk / FNVHash.cs
Last active December 14, 2019 00:17
Lightweight implementation of 32 & 64 bit FNV Hash algorithms
using System;
namespace DevHawk
{
public class FNVHash
{
public const uint Prime32 = 16777619;
public const uint Offset32 = 2166136261;
public const ulong Prime64 = 1099511628211;
public const ulong Offset64 = 14695981039346656037;
'use strict'
const { fetchPackage, getLatestVersion } = require('../nuget/nuget-v3-helpers')
const { renderVersionBadge } = require('../nuget/nuget-helpers')
const { BaseJsonService } = require('..')
const { NotFound } = require('..')
class AzureArtifactsNugetVersionService extends BaseJsonService {
static get category() {
return 'version'
import { disassembleByteCode } from '@neo-one/node-core'
import * as fs from "fs";
async function mainAsync() {
const PATH = String.raw`path\to\avm\file`
let avmByteCodes = await fs.promises.readFile(PATH);
const lines = disassembleByteCode(avmByteCodes)
for (const line of lines)
{
@devhawk
devhawk / vsdevcmd.yml
Last active November 1, 2023 21:42
Locate vsdevcmd in azure pipelines
parameters:
buildArchitecture: 'x86' # defaults for any parameters that aren't specified
hostArchitecture: 'x86'
steps:
- script: |
@echo off
set vswherepath="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
for /f "usebackq delims=" %%i in (`%vswherepath% -latest -property installationPath`) do (
void write_snake_case(writer& w, std::string_view const& name, bool uppercase)
{
auto case_func = [uppercase](char c)
{
return uppercase
? static_cast<char>(::toupper(c))
: static_cast<char>(::tolower(c));
};
function Get-PythonVersions {
(get-item HKCU:\Software\Python\PythonCore).GetSubKeyNames()
}
function Get-DefaultPython {
$pythons = Get-PythonVersions | ForEach-Object{Get-ItemProperty "hkcu:\Software\Python\PythonCore\$_"}
$x64Pythons = $pythons | Where-Object{$_.SysArchitecture.StartsWith("64")} | Sort-Object -Property SysVersion -Descending
using System;
using System.Diagnostics;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
// https://stackoverflow.com/a/21848564
public class ConsoleAppManager
{
private readonly string appName;
@devhawk
devhawk / python_locator.ps1
Last active February 26, 2019 21:10
Powershell utilities for locating Python installations from Windows registry
function Get-DefaultPython {
$pythonVersions = (get-item HKCU:\Software\Python\PythonCore).GetSubKeyNames()
$pythons = $pythonVersions | %{Get-ItemProperty "hkcu:\Software\Python\PythonCore\$_"}
# favor most recent version of Python and x64 version of Python over x86 version
$x64Pythons = $pythons | ?{$_.SysArchitecture.StartsWith("64")} | Sort-Object -Property SysVersion -Descending
if ($x64Pythons.Length -gt 0)
{