Skip to content

Instantly share code, notes, and snippets.

@vnisor
vnisor / C# radix tree
Created April 1, 2016 22:27 — forked from paratechnical/C# radix tree
C# radix tree
public class Tree
{
/// <summary>
/// store the tree's root
/// </summary>
private Node _root;
/// <summary>
/// construct a new tree with it's root
/// </summary>
@vnisor
vnisor / WhoisCommand.cs
Created February 23, 2016 19:57 — forked from c1982/WhoisCommand.cs
PowerShell Whois Module
// Author: Oğuzhan YILMAZ
// Web : www.oguzhan.info
// Email : aspsrc@gmail.com
// 12/13/2011
namespace PoshWhois
{
using System;
using System.Collections.Generic;
using System.IO;
@vnisor
vnisor / Whois.cs
Created February 23, 2016 19:56 — forked from vkbandi/Whois.cs
A C#.net class to fetch whois information for a .com domain name
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace DomainTools
{
@vnisor
vnisor / himawari.ps1
Created February 3, 2016 23:28 — forked from MichaelPote/himawari.ps1
Windows Powershell Script to download the latest image from the Himawari-8 satelite, combine the tiles into a single image, convert to jpg and then set as the desktop background.
#
# Himawari-8 Downloader
#
#
#
# This script will scrape the latest image from the Himawari-8 satellite, recombining the tiled image,
# converting it to a JPG which is saved in My Pictures\Himawari\ and then set as the desktop background.
#
# http://himawari8.nict.go.jp/himawari8-image.htm
#
## Please set the ROOT to your nxlog installation directory
#define ROOT C:\Program Files\nxlog
define ROOT C:\Program Files (x86)\nxlog
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir %ROOT%\data
LogFile %ROOT%\data\nxlog.log
## This is a sample NXLog configuration file created by Loggly. June 2013
## See the nxlog reference manual about the configuration options.
## It should be installed locally and is also available
## online at http://nxlog.org/nxlog-docs/en/nxlog-reference-manual.html
## Please set the ROOT to the folder your nxlog was installed into,
## otherwise it will not start.
#define ROOT C:\Program Files\nxlog
define ROOT C:\Program Files (x86)\nxlog
#Only needs to be loaded once, like most rsyslog modules
$ModLoad imfile
#path to the file which you want to monitor
$InputFileName /var/log/apache2/access.log
#The tag apache can be changed to whatever you'd like
$InputFileTag apache:
#the name of file within rsyslogs working directory

SSL in English.

Server-side

Key-(re-)generation

  1. Generates an RSA public/private key pair.
  2. Uploads the public key to the CA.
  3. The CA issues a validity certificate.
  4. Appends any intermediate certificate to it as necessary.
  5. Installs the CA and public key on the server.
@vnisor
vnisor / Program.cs
Created December 30, 2013 21:29 — forked from chakrit/Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Sider;
namespace DummyConsole
{
class Program
/** Reinflates a compressed signature string:
resolution = a representation of the resolution in
pixels of the canvas which this signature will be drawn
e.g. {x:800,y:200}
*/
var inflateToJsonSignature = function (deflatedSig, resolution) {
var components = [],
modifier = 1,
compressWithResolution = /^(?:\[(\d+)x(\d+)\])?([\w\W]*)/,
parsedSigString = deflatedSig.match(compressWithResolution),