Skip to content

Instantly share code, notes, and snippets.

@scolestock
scolestock / ReadLineWithMask.cs
Created September 30, 2016 17:02
C# ReadLine with mask
// http://stackoverflow.com/questions/3404421/password-masking-console-application
private string ReadLineWithMask()
{
string pass = "";
ConsoleKeyInfo key;
do
{
key = Console.ReadKey(true);
@scolestock
scolestock / ConsoleSpinner.cs
Last active July 20, 2020 14:25
C# Console spinner
// Inspired by http://www.dib0.nl/code/458-a-spinner-for-console-in-net
public class ConsoleSpinner
{
/// <summary>
/// Displays a text spinner and ellipses until a task completes.
/// </summary>
/// <param name="task">Task to watch for completion</param>
/// <param name="description">Description of the work - single word</param>
public static void UntilTaskComplete(Task task, string description = "work")
{
@scolestock
scolestock / 0_reuse_code.js
Last active August 29, 2015 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Linq;
using Xamarin.Forms;
namespace WrapPanelDemo.Controls
{
public class AwesomeWrappanel : Layout<View>
{