Skip to content

Instantly share code, notes, and snippets.

View lambidu's full-sized avatar

Roman Popovici lambidu

View GitHub Profile
@judero01col
judero01col / Service KMS
Last active April 28, 2025 05:41
Volume License Activation Key Service - KMS
## Find Available Target Editions
DISM.exe /Online /Get-TargetEditions
## Convert Server Standard 2019 Evaluation to Server Standard 2019
DISM /online /Set-Edition:ServerStandard /ProductKey:N69G4-B89J2-4G8F4-WWYCC-J464C /AcceptEula
## How To Activate
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr /skms [server]:[port]
slmgr /ato
@danielbierwirth
danielbierwirth / TCPTestClient.cs
Last active August 17, 2024 07:19
TCP Client-Server Connection Example | Unity | C# | Bidirectional communication sample: Client can connect to server; Client can send and receive messages: Server accepts clients; Server reads client messages; Server sends messages to client
// This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/
// or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using UnityEngine;
@mgeeky
mgeeky / xor-key-recovery.py
Created December 7, 2016 16:55
Simple XOR brute-force Key recovery script - given a cipher text, plain text and key length - it searches for proper key that could decrypt cipher into text.
#!/usr/bin/python
#
# Simple XOR brute-force Key recovery script - given a cipher text, plain text and key length
# it searches for proper key that could decrypt cipher into text.
#
# Mariusz B., 2016
#
import sys
@ewandennis
ewandennis / transmissions-speed.php
Created November 15, 2016 19:14
A cURL connection reuse speed test
<?php
function setoptions($session) {
curl_setopt($session, CURLOPT_TCP_NODELAY, TRUE);
curl_setopt($session, CURLOPT_ENCODING, 'gzip');
// curl_setopt($session, CURLOPT_TCP_FASTOPEN, TRUE);
}
$trans = "{
\"options\": {
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev -y
sudo apt-get install libfreetype6 libfreetype6-dev -y
sudo apt-get install libfontconfig1 libfontconfig1-dev -y
cd ~
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2
sudo tar xvjf $PHANTOM_JS.tar.bz2
sudo mv $PHANTOM_JS /usr/local/share
sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
@iamarcel
iamarcel / Creating Neat .NET Core Command Line Apps.md
Last active November 28, 2023 10:41
Creating Neat .NET Core Command Line Apps

Creating Neat .NET Core Command Line Apps

You can now read this on my (pretty) website! Check it out here.

Every reason to get more HackerPoints™ is a good one, so today we're going to write a neat command line app in .NET Core! The Common library has a really cool package Microsoft.Extensions.CommandlineUtils to help us parse command line arguments and structure our app, but sadly it's undocumented.

No more! In this guide, we'll explore the package and write a really neat

@sichbo
sichbo / UnixTcpListenerBug.cs
Created June 30, 2016 18:50
Unix TcpListener bug
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Threading.Tasks;
using System.Threading;
namespace TcpListenerTest
{
[HideInInspector] public PropertyInfo SourceProperty;
[HideInInspector] public PropertyInfo TargetProperty;
void Start()
{
SourceProperty.ObserveEveryValueChanged(x => x.GetValue(Source, null)).Subscribe(UpdateTargetProperty);
}
private void UpdateTargetProperty(object value)
{
@russgray
russgray / marshal-variable-length-array.cs
Created September 29, 2014 16:20
Marshalling a variable-length array from unmanaged code in C#
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
namespace DnsMarshallingTest
{
#region Data structures
[Flags]
internal enum DnsRecordType : ushort
@theburningmonk
theburningmonk / DictToExpando.cs
Created March 28, 2012 00:02
Dictionary to Expando
/// <summary>
/// Extension method that turns a dictionary of string and object to an ExpandoObject
/// </summary>
public static ExpandoObject ToExpando(this IDictionary<string, object> dictionary)
{
var expando = new ExpandoObject();
var expandoDic = (IDictionary<string, object>)expando;
// go through the items in the dictionary and copy over the key value pairs)
foreach (var kvp in dictionary)