Skip to content

Instantly share code, notes, and snippets.

@alexandrnikitin
alexandrnikitin / Program.cs
Created April 7, 2017 13:34
How to set processor group affinity in .NET C#
namespace ConsoleApp1
{
class Program
{
[StructLayout(LayoutKind.Sequential, Pack = 4)]
private struct _GROUP_AFFINITY
{
public UIntPtr Mask;
[MarshalAs(UnmanagedType.U2)]
public ushort Group;
.jvmArgs("-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintAssembly", "-Xmx8G", "-XX:+UseG1GC")
.addProfiler(WinPerfAsmProfiler.class)
@alexandrnikitin
alexandrnikitin / iptables_rules.sh
Created December 5, 2016 08:56 — forked from virtualstaticvoid/iptables_rules.sh
25 Most Frequently Used Linux IPTables Rules Examples
# Modify this file accordingly for your specific requirement.
# http://www.thegeekstuff.com
# 1. Delete all existing rules
iptables -F
# 2. Set default chain policies
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP
FROM windowsservercore
ADD http://javadl.oracle.com/webapps/download/AutoDL?BundleId=210185 C:\jre-8u91-windows-x64.exe
RUN powershell start-process -filepath C:\jre-8u91-windows-x64.exe -passthru -wait -argumentlist "/s,INSTALLDIR=c:\Java\jre1.8.0_91,/L,install64.log"
RUN del C:\jre-8u91-windows-x64.exe
CMD [ "c:\\Java\\jre1.8.0_91\\bin\\java.exe", "-version"]
using System.Collections.Generic;
using System.IO;
using Mono.Cecil;
using Mono.Cecil.Cil;
using Mono.Cecil.Rocks;
namespace Analysis
{
internal class Program
@alexandrnikitin
alexandrnikitin / how-to-learn-scala.md
Last active May 29, 2018 21:49
How to learn Scala
@alexandrnikitin
alexandrnikitin / CreateScannerAsync.cs
Created March 22, 2016 10:49
HBaseClient.CreateScannerAsync decompiled
using Microsoft.HBase.Client;
using Microsoft.HBase.Client.Internal;
using org.apache.hadoop.hbase.rest.protobuf.generated;
using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
[CompilerGenerated]
private sealed class <CreateScannerAsync>d__9 : IAsyncStateMachine
Target competition: VectorizedCopyBenchmark
// ***** BenchmarkRunner: Start *****
// Found benchmarks:
// VectorizedCopyBenchmark_ArrayCopy (Throughput_X64_RyuJit_NET-HostFramework)
// VectorizedCopyBenchmark_BlockCopy (Throughput_X64_RyuJit_NET-HostFramework)
// **************************
// Benchmark: VectorizedCopyBenchmark_ArrayCopy (Throughput_X64_RyuJit_NET-HostFramework)
// *** Generate ***
// Result = Success
@alexandrnikitin
alexandrnikitin / Program.cs
Last active November 23, 2015 18:19
Generic performance
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
namespace PerformanceProblem
{
public class Program
{
public static void Main()