Skip to content

Instantly share code, notes, and snippets.

View 13xforever's full-sized avatar
💮
わたしは あの路で死んだ花

Ilya 13xforever

💮
わたしは あの路で死んだ花
View GitHub Profile

Keybase proof

I hereby claim:

  • I am 13xforever on github.
  • I am 13xforever (https://keybase.io/13xforever) on keybase.
  • I have a public key ASBv7cQQnzNQ64fyBFomr7-8ujat1BjLf5wvCM7Ujh46KAo

To claim this, I am signing this object:

internal static class Program
{
private static readonly SemaphoreSlim InstanceCheck = new SemaphoreSlim(0, 1);
private static readonly SemaphoreSlim ShutdownCheck = new SemaphoreSlim(0, 1);
internal static async Task Main(string[] args)
{
var thread = new Thread(() =>
{
using (var instanceLock = new Mutex(false, @"Global\mutex name"))
if ([System.Environment]::OSVersion.Version.Major -lt 6) { throw "Unsupported OS" }
$aeroEnablerSource = @'
using System;
using System.Runtime.InteropServices;
namespace CustomInterop
{
[Flags]
public enum DWM_BB
@13xforever
13xforever / hotspot_conf_decoder.cs
Created October 20, 2016 10:21
Nintendo Zone hotspot.conf Decoder
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace hotspot_conf_decoder
{
class Program
{
@13xforever
13xforever / IXMLDOMDocument.d.ts
Last active April 18, 2018 08:17
TypeScript typings for IXMLDOMDocument and IXMLDOMSchemaCollection ActiveX objects
declare module ActiveX {
export interface IXMLDOMNode {
attributes: IXMLDOMNamedNodeMap;
baseName?: string;
childNodes: IXMLDOMNodeList;
dataType?: string;
definition?: IXMLDOMNode;
firstChild: IXMLDOMNode;
lastChild: IXMLDOMNode;
namespaceURI?: string;
//he.net
216.218.221.6
216.218.221.42
74.82.46.6
216.66.84.46
216.66.86.114
216.66.87.14
216.66.80.30
216.66.80.26
216.66.84.42
#!/bin/sh
opkg update
opkg remove dnsmasq
opkg install dnsmasq-full 6in4 tc miniupnpd luci-ssl luci-proto-ipv6 luci-app-upnp uhttpd-mod-tls
rm /etc/config/*-opkg
cp /etc/config/uhttpd.crt /etc/config/
cp /etc/config/uhttpd.key /etc/config/
cp /etc/config/dnscachestats.sh ~/
using System.Collections.Generic;
namespace System.Linq.Enumerable
{
public static class Quickselect
{
/// <summary>
/// Selects <b>count</b> <i>smallest</i> elements according to a key. Result is returned in no particular order.
/// </summary>
/// <typeparam name="T">Type of elements in collection</typeparam>
@13xforever
13xforever / KeyValuePair.cs
Last active December 18, 2015 02:39
KeyValuePair constuction helper
public static class KeyValuePair
{
public static KeyValuePair<TKey, TValue> Create<TKey, TValue>(TKey key, TValue value)
{
return new KeyValuePair<TKey, TValue>(key, value);
}
}
@13xforever
13xforever / GitInfo.cs
Created June 19, 2012 12:20
Getting last commit with changes in specified subfolder in git repository
internal class GitInfo : VcsInfoRetriever
{
public override VcsInfoData Execute(string localPath)
{
string relativePath;
var repoPath = FindRepoRoot(localPath, ".git\\index", out relativePath);
if (repoPath == null) return null;
using (var repo = new Repository(repoPath))
{