Skip to content

Instantly share code, notes, and snippets.

View stephensmitchell's full-sized avatar
💭
NNODESS

Stephen S. Mitchell stephensmitchell

💭
NNODESS
  • NNODESS
  • Earth
View GitHub Profile
@stephensmitchell
stephensmitchell / setupDevEnv_workaroundWSL2vhdxLimit.md
Created July 11, 2020 22:09 — forked from datocrats-org/setupDevEnv_workaroundWSL2vhdxLimit.md
Backup and restore WSL2 vhdx, avoid 256GB vhdx limit for docker desktop WSL2 native

Determine the expected size of the docker-desktop-data volume

  • Get the base image size + additional + all docker volumes using docker system df
  • Add raw uncompressed size for alpine (50MB), docker for your version of windows (700MB) and linux (80MB)

docker system df

Get info for the docker-desktop-data VHD

PS C:\Users\windows-admin\AppData\Local\Docker\wsl\data> Get-VHD -Path C:\Users\windows-admin\AppData\Local\Docker\wsl\data\ext4.vhdx
@stephensmitchell
stephensmitchell / ProcessAsyncHelper.cs
Created June 24, 2020 23:56 — forked from AlexMAS/ProcessAsyncHelper.cs
The right way to run external process in .NET (async version)
using System;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
public static class ProcessAsyncHelper
{
public static async Task<ProcessResult> ExecuteShellCommand(string command, string arguments, int timeout)
{
var result = new ProcessResult();
@stephensmitchell
stephensmitchell / ProcessAsyncHelper.cs
Created June 24, 2020 23:56 — forked from AlexMAS/ProcessAsyncHelper.cs
The right way to run external process in .NET (async version)
using System;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
public static class ProcessAsyncHelper
{
public static async Task<ProcessResult> ExecuteShellCommand(string command, string arguments, int timeout)
{
var result = new ProcessResult();
@stephensmitchell
stephensmitchell / cgal_installer.sh
Created May 13, 2020 02:52 — forked from ytakzk/cgal_installer.sh
A script to install CGAL on ubuntu
apt update
apt install g++ cmake libcgal-dev build-essential vim git
g++ main.cpp -lCGAL -lgmp
@stephensmitchell
stephensmitchell / Dark Continuous.json
Created March 17, 2020 07:28 — forked from praeclarum/Dark Continuous.json
A dark and vibrant color theme for Visual Studio for Mac
{
"name": "Dark Continuous",
"version": "1.0",
"description": "Dark and Vibrant from Continuous for the iPad",
"originator": "Frank A. Krueger",
"palette": [
{ "name": "cont-white", "value": "#F2F2F8" },
{ "name": "cont-selection", "value": "#4B5566" },
{ "name": "cont-background", "value": "#282A2E" },
@stephensmitchell
stephensmitchell / HelloSceneKitController.cs
Created March 4, 2020 17:59 — forked from mikebluestein/HelloSceneKitController.cs
A simple iOS 8 Scene Kit example using C# and Xamarin
using System;
using MonoTouch.UIKit;
using MonoTouch.SceneKit;
using MonoTouch.Foundation;
namespace HelloSceneKit
{
public class HelloSceneKitController : UIViewController
{
SCNView sceneView;
@stephensmitchell
stephensmitchell / layout.htm
Created January 30, 2020 05:27 — forked from AdamAlinauskas/layout.htm
Web page layout using divs with a header, footer, right sidebar, left sidebar and an area for main content.
<html>
<head>
<style>
#header{
background-color: lightblue;
width:100%;
height:50px;
text-align: center;
}
@stephensmitchell
stephensmitchell / scrapy.md
Created January 14, 2020 14:55 — forked from bradtraversy/scrapy.md
Scrapy commands and code
@stephensmitchell
stephensmitchell / GearGH.cs
Created January 13, 2020 08:39 — forked from jhorikawa/GearGH.cs
Grasshopper C# component script for gear simulation.
public class Script_Instance : GH_ScriptInstance
{
#region Utility functions
/// <summary>Print a String to the [Out] Parameter of the Script component.</summary>
/// <param name="text">String to print.</param>
private void Print(string text) { /* Implementation hidden. */ }
/// <summary>Print a formatted String to the [Out] Parameter of the Script component.</summary>
/// <param name="format">String format.</param>
/// <param name="args">Formatting parameters.</param>
private void Print(string format, params object[] args) { /* Implementation hidden. */ }
@stephensmitchell
stephensmitchell / imgui_node_graph_test.cpp
Created December 27, 2019 09:31 — forked from ocornut/imgui_node_graph_test.cpp
Node graph editor basic demo for ImGui
// Creating a node graph editor for ImGui
// Quick demo, not production code! This is more of a demo of how to use ImGui to create custom stuff.
// Better version by @daniel_collin here https://gist.github.com/emoon/b8ff4b4ce4f1b43e79f2
// See https://github.com/ocornut/imgui/issues/306
// v0.03: fixed grid offset issue, inverted sign of 'scrolling'
// Animated gif: https://cloud.githubusercontent.com/assets/8225057/9472357/c0263c04-4b4c-11e5-9fdf-2cd4f33f6582.gif
#include <math.h> // fmodf
// NB: You can use math functions/operators on ImVec2 if you #define IMGUI_DEFINE_MATH_OPERATORS and #include "imgui_internal.h"