Skip to content

Instantly share code, notes, and snippets.

View rkttu's full-sized avatar

Jung Hyun Nam rkttu

View GitHub Profile
@rkttu
rkttu / install_wsl_debian.cmd
Created June 30, 2019 15:55
Simple WSL debian installer script
@echo off
pushd "%~dp0"
set DistroType=debian
set DistroUrl=https://aka.ms/wsl-debian-gnulinux
echo This script will setup new %DistroType% distro.
set /p DistroName="Enter Distro Alias: "
set /p AccountId="Enter Account ID: "
choice /c YN /m "Press Y for set as default distro, N for not."
@rkttu
rkttu / Dockerfile
Last active April 2, 2024 08:10
Run Office 2019 in Windows Full Container (19H1)
FROM mcr.microsoft.com/windows:1903 AS build
WORKDIR C:\\odtsetup
ADD https://download.microsoft.com/download/2/7/A/27AF1BE6-DD20-4CB4-B154-EBAB8A7D4A7E/officedeploymenttool_11617-33601.exe odtsetup.exe
RUN odtsetup.exe /quiet /norestart /extract:C:\\odtsetup
FROM mcr.microsoft.com/windows:1903 AS download
WORKDIR C:\\odtsetup
COPY --from=build C:\\odtsetup\\setup.exe .
@rkttu
rkttu / azure-container-instance.yaml
Created March 31, 2019 13:25
Azure Container Instance Sample
apiVersion: v1
kind: Pod
metadata:
name: iis-winsvrcore
spec:
containers:
- image: mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2016
imagePullPolicy: Always
name: iis-winsvrcore
resources:
@rkttu
rkttu / azure-vote-hybrid.yaml
Created March 31, 2019 08:06
Hybrid Kubernetes Workload Example
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: azure-vote-back
spec:
replicas: 1
template:
metadata:
labels:
app: azure-vote-back
@rkttu
rkttu / iis.yaml
Created November 23, 2018 01:31
Windows IIS K8S Deploy YAML Sample
apiVersion: v1
kind: Pod
metadata:
labels:
name: iis
name: iis
namespace: default
spec:
containers:
- image: microsoft/iis:windowsservercore-1803
@rkttu
rkttu / dockerd.cmd
Created March 27, 2018 08:43
Run Docker Daemon in WSL Ubuntu
@echo off
pushd "%~dp0"
cls
echo This script allows you to run docker daemon.
echo.
net session >nul 2>&1
if not %errorLevel% == 0 (
echo To run this script, you must run it as a user with administrative privileges.
@rkttu
rkttu / hvswitch.cmd
Created February 14, 2018 05:38
Windows Hypervisor Switch Tool
@echo off
pushd "%~dp0"
cls
echo This script allows you to easily turn on or off Windows Hypervisor settings at once. This script is useful when you want to use Hyper-V or Docker for Windows with other hypervisors.
echo.
net session >nul 2>&1
if not %errorLevel% == 0 (
echo To run this script, you must run it as a user with administrative privileges.
@rkttu
rkttu / ReceiptScanner.cs
Created October 15, 2017 16:48
Receipt Scanner OpenCV C#
using OpenCvSharp;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using static OpenCvSharp.Cv2;
using static System.Math;
namespace ReceiptScannerCSharp
{
@rkttu
rkttu / WhenUsingAppRepository.cs
Last active July 12, 2017 06:31
MSpec, EF Core 2.0 In-Memory Provider Sample
using TheCompany.Something.Api.Repositories;
using TheCompany.Something.Data;
using TheCompany.Something.Data.Models;
using Machine.Fakes;
using Machine.Specifications;
using Microsoft.EntityFrameworkCore;
using System;
using System.Threading;
using System.Threading.Tasks;
@rkttu
rkttu / Web API Scratchpad.linq
Created July 7, 2017 17:19
Web API Scratchpad with LINQPad
<Query Kind="Program">
<Connection>
<ID>bea78312-0e65-4c9e-8db4-e64dea24514e</ID>
<Persist>true</Persist>
<Server>(localdb)\hubk</Server>
<Database>PointSaving</Database>
<ShowServer>true</ShowServer>
</Connection>
<NuGetReference>Autofac.WebApi2</NuGetReference>
<NuGetReference>Microsoft.AspNet.WebApi.OwinSelfHost</NuGetReference>