This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Threading; | |
using System.Threading.Tasks; | |
public static class StreamUtil | |
{ | |
public static async Task<byte[]> ReadAsync(this Stream stream, | |
int length, CancellationToken cancellationToken) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.IO; | |
using System.IO.Compression; | |
public static class ZipUtil | |
{ | |
public static byte[] Compress(this Dictionary<string, byte[]> entries) | |
{ | |
using (var stream = new MemoryStream()) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <math.h> | |
using namespace std; | |
int StartingAt(int n); | |
int main() | |
{ | |
cout << StartingAt(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO.Pipes; | |
using System.IO; | |
using System.Threading; | |
using System.Text; | |
using Microsoft.Win32.SafeHandles; | |
class Program | |
{ | |
static PipeStream stream; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
static class Program | |
{ | |
static void Main(string[] args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
public partial struct Location | |
{ | |
public static readonly Location Empty; | |
static Location() | |
{ | |
Empty = new Location { Latitude = 0, Longitude = 0 }; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See this article for the background. | |
// http://blogs.technet.com/b/dataplatforminsider/archive/2014/09/25/using-ssds-in-azure-vms-to-store-sql-server-tempdb-and-buffer-pool-extensions.aspx | |
using System; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using System.Security.AccessControl; | |
using System.Security.Principal; | |
using System.ServiceProcess; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Exec</h1> | |
<%= form_tag(command_exec_url) do %> | |
<div class="actions"> | |
<%= text_area_tag(:stdin, "", size: "50x20") %> | |
</div> | |
<%= submit_tag("Execute") %> | |
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using System.Security.Cryptography; | |
using System.Text; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string iv, key; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Security.Cryptography; | |
using System.Text; | |
static class Program | |
{ | |
static MD5 md5; | |
static MemoryStream ms; | |
static StreamWriter sw; |