Skip to content

Instantly share code, notes, and snippets.

View amoretspero's full-sized avatar
🏠
Working from home

Jiung amoretspero

🏠
Working from home
View GitHub Profile
@amoretspero
amoretspero / az-vm-create--with-existing-vhd.txt
Last active June 8, 2017 09:37
azure-cli template for azure vm creation with existing vhd file.
===Prerequisites===
1. Azure Cli (on bash on Ubuntu on Windows OR powershell OR Linux shell OR MacOS)
2. vhd image of previously deployed VM
3. storage account to add vhd.
===Steps===
1. Create Storage account in Azure portal or azure-cli.
Storage account type does not matter. Choose at your needs.
@amoretspero
amoretspero / ClientSideCode-JavaScript.js
Created May 18, 2017 12:34
Sample code for client-side code in JavaScript
/*
==========
File name: examsearch-index.js
This javascript file contains javascript codes that should be used only at /ExamSearch/Index.cshtml
Codes that are used at other files or codes that can also be used at some other files should not go here.
Codes that can also be used at some other files should go to:
1) site.js -> When That code is used over the entire site.
2) ***.js -> When code is not used over the entire site, but shared by plural files.
@amoretspero
amoretspero / ClientSideCode-HTML-Razor-Index.cshtml
Created May 18, 2017 12:33
Sample code for client-side code in HTML and Razor.
@model ExamSearchIndexViewModel
@{
ViewData["Title"] = "";
Layout = "_Layout_Testcloud_Main";
}
@section Metatags {
<meta name="description" content="기클: 기출문제클라우드는 캠퍼스박스에서 제공하는 기출문제 검색 서비스입니다. 원하는 기출문제와 해설을 간단하게 다운로드할 수 있으며, 등급컷과 난이도 정보 역시 확인할 수 있습니다." />
}
@amoretspero
amoretspero / ServerSideCode-CSharp-ASPdotNETCore.cs
Created May 18, 2017 12:32
Sample code for server-side C#, ASP.NET Core.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Diagnostics;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using csatdb.Models;
using csatdb.Models.ExamSearchViewModels;
using csatdb.Data;
@amoretspero
amoretspero / StationClass.fs
Created June 22, 2016 16:24
Data Communication simulation - station class
type station (name : string, chargeTime : int) =
member val name = name
member val backoff = -1 with get, set
member val chargeTime = chargeTime with get, set
member val transmit = false with get, set
member val collisionDetectTime = -1 with get, set
member val transmitTime = -1 with get, set
member val currentPacketNumber = 0 with get, set
member val waitACK = -1 with get, set
member val ackTransmit = false with get, set