Skip to content

Instantly share code, notes, and snippets.

@steos
steos / TestAsyncHttpClientDownloadProgress.java
Created May 24, 2012 14:37
test apache httpasyncclient download progress (with mpcorb dataset)
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.concurrent.Future;
import java.util.zip.GZIPInputStream;
import org.apache.http.Header;
import org.apache.http.HttpException;
@wavezhang
wavezhang / java_download.sh
Last active March 4, 2025 08:52
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@nathancorvussolis
nathancorvussolis / wix-bootstrap-download-vcredist-sample.wxs
Last active February 24, 2025 16:45
Visual C++ 2015-2022 Redistributable - 14.36.32532
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle
Name="Example Product"
Version="1.2.3.4"
Manufacturer="John Doe"
Copyright="© 2023 John Doe"
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle
Name="Example Product"
Version="1.2.3.4"
Manufacturer="John Doe"
Copyright="© 2021 John Doe"
@ivanskodje
ivanskodje / youtube-dl-download-pluralsight-videos.md
Last active February 4, 2025 05:07
youtube-dl for downloading pluralsight videos

Downloading Videos from Pluralsight

Disclaimer

Pluralsight do not permit users to download their videos.
If you are an user of pluralsight you have agreed with their ToS,
and are thusly refrained from doing so.
Use this knowledge at your own risk.

youtube-dl for Windows

@ygoe
ygoe / WindowsRegistry.cs
Created July 20, 2017 08:56
A class that provides Windows registry access for .NET Framework (define NETFULL) and .NET Standard 1.6 (define NETSTANDARD) projects through P/Invoke.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
using Microsoft.Win32;
namespace MyNamespace
{
internal class WindowsRegistry
@degski
degski / invertible_hash_functions.hpp
Last active July 27, 2024 16:52
invertible hash functions
// MIT License
//
// Copyright (c) 2018 degski
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@47star
47star / Set-VMIPAddress.ps1
Created April 5, 2019 15:23
Assign static IP address for Hyper-V Guest.
param( [String]$VMName="",
[String]$Address="",
[String]$Gateway="",
[String]$SubnetMask="",
[String]$DNS1="",
[String]$DNS2="")
$Msvm_VirtualSystemManagementService = Get-WmiObject -Namespace root\virtualization\v2 -Class Msvm_VirtualSystemManagementService
$Msvm_ComputerSystem = Get-WmiObject -Namespace root\virtualization\v2 -Class Msvm_ComputerSystem -Filter "ElementName='$VMName'"
$Msvm_VirtualSystemSettingData = ($Msvm_ComputerSystem.GetRelated("Msvm_VirtualSystemSettingData", "Msvm_SettingsDefineState", $null, $null, "SettingData", "ManagedElement", $false, $null) | % {$_})
$Msvm_SyntheticEthernetPortSettingData = $Msvm_VirtualSystemSettingData.GetRelated("Msvm_SyntheticEthernetPortSettingData")
@aannenko
aannenko / CryptSharp.cs
Last active August 30, 2023 17:18
CryptSharp - crypt(3) via C# and .NET Core (min .NET Core version = 2.1; min .NET Standard = 2.1)
using System;
namespace Crypt
{
public static class CryptSharp
{
private const string m_encryptionSaltCharacters =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./";
private const int m_desIterations = 16;