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.Linq; | |
using System.Collections.Generic; | |
public class Program | |
{ | |
public void Main(string[] args) | |
{ | |
Apple apple = new Apple(); | |
Orange orange = new Orange(); |
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.Linq; | |
namespace Extensions | |
{ | |
/// <summary> | |
/// Allow the up to the first eight elements of an array to take part in C# 7's destructuring syntax. | |
/// </summary> | |
/// <example> | |
/// (int first, _, int middle, _, int[] rest) = new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; |
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.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Scratch | |
{ | |
class Program | |
{ |
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
namespace PatternMatchTest | |
{ | |
class Program | |
{ | |
public static void Main() | |
{ | |
Animal[] TestCases = { | |
new Dog(), | |
new Cat { IsDangerous = true }, | |
new Cat { IsDangerous = false } |
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
# in your home directory, add the following to the end of the .gitconfig file: | |
[color] | |
ui = true | |
[color "status"] | |
changed = cyan bold | |
untracked = yellow bold | |
added = green bold | |
branch = cyan bold | |
unmerged = red bold |
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
# get removable packages using: Get-AppxPackage | Select Name, PackageFullName | |
Remove-AppxPackage 9E2F88E3.Twitter_4.3.4.0_x86__wgeqdkkx372wm | |
Remove-AppxPackage Microsoft.BingFinance_4.8.268.0_x86__8wekyb3d8bbwe | |
Remove-AppxPackage Microsoft.BingNews_4.8.268.0_x86__8wekyb3d8bbwe | |
Remove-AppxPackage Microsoft.BingSports_4.8.268.0_x86__8wekyb3d8bbwe | |
Remove-AppxPackage Microsoft.BingWeather_4.8.277.0_x86__8wekyb3d8bbwe | |
Remove-AppxPackage Microsoft.MicrosoftSolitaireCollection_3.8.3092.0_x64__8wekyb3d8bbwe | |
Remove-AppxPackage Microsoft.Office.Sway_17.6769.45081.0_x64__8wekyb3d8bbwe | |
Remove-AppxPackage Microsoft.SkypeApp_3.2.1.0_x86__kzf8qxf38zg5c |
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.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
namespace TestRun | |
{ | |
// sample test run results |
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
" standard vim options | |
set guifont=Consolas:h14:cANSI | |
set nocompatible | |
set backspace=indent,eol,start | |
set guioptions-=T | |
syntax enable | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set ignorecase |
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
#!/usr/bin/env python | |
# Python 2 script that parses Stuart Jay Raj's "First Words to Learn - Enhanced Wordlist from Fluency Forever Multi Lang" | |
# Input file should be the JSON export here: https://spreadsheets.google.com/feeds/list/1GsNe8GVzgIuOeeEVBCcoIvxVMDO5xnEgGRr8EKtcSGI/1/public/basic?alt=json | |
# See original spreadsheet here: https://docs.google.com/spreadsheets/d/1GsNe8GVzgIuOeeEVBCcoIvxVMDO5xnEgGRr8EKtcSGI/edit#gid=884321509 | |
import json | |
import codecs | |
QUESTION_LANGUAGE = 'thaith' |
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
type WebSocketResponse = | |
| Close | |
| Message of msg : string | |
let rec readMessagePatternMatch (ws:WebSocket) : Async<WebSocketResponse> = | |
let buffer : byte array = Array.zeroCreate 1024 | |
let utf8 = new UTF8Encoding() | |
async { | |
let! payload = ws.ReceiveAsync(new ArraySegment<byte>(buffer), CancellationToken.None) |> Async.AwaitTask | |
return! match payload.MessageType with |