Skip to content

Instantly share code, notes, and snippets.

View wellwind's full-sized avatar

Mike Huang wellwind

View GitHub Profile
@wellwind
wellwind / NSubstitute.TestUtils.DbContextExtensions.cs
Last active June 22, 2017 06:56
NSubstitute模擬Entity Framework的DbContext用的Extension
public static class DbContextExtensions
{
/// <summary>
/// 從ScenarioContext中取得IDbSet&lt;T&gt;,並加入dbContext中。
/// 其中propertyName若不指定則預設用T的名稱。
/// ex1: IDbSet&lt;SomeClass&gt; SomeClass
/// 在不指定propertyName時會將內容加入dbContext.SomeClass中。
/// ex2: IDbSet&lt;SomeClass&gt; AnotherName
/// 若需要使用dbContext.AnotherName則必須將propertyName設為"AnotherName"。
/// </summary>
  1. Update
sudo apt-get update
sudo apt-get upgrade

sudo rpi-update
  1. reboot
@wellwind
wellwind / global.asax
Created September 30, 2016 13:09
Asp.Net MVC handle error sample
public class WebApiApplication : System.Web.HttpApplication
{
protected void Application_EndRequest()
{
if (Context.Response.StatusCode == 200)
{
return;
}
Response.Clear();
Response.ContentType = "text/json";
@wellwind
wellwind / allow.sh
Last active January 5, 2017 09:09
Ubuntu Firewall
sudo ufw allow from 140.119.210.170 to any port 21
sudo ufw status numbered
sudo ufw delete numbered
  1. ng new nativescript-with-ng-cli
  2. cd nativescript-with-ng-cli
  3. rm -rf src
  4. tns create src --ng
  5. .gitignore
# NativeScript
src/node_modules
src/platforms
@wellwind
wellwind / cloudSettings
Last active April 27, 2017 01:03
Visual Studio Code Sync Settings Gist
{"lastUpload":"2017-04-27T01:02:40.563Z","extensionVersion":"v2.6.2"}
@wellwind
wellwind / README.md
Last active May 10, 2017 14:39
線上Angular讀書會 - Electron & NativeScript開發經驗分享 - Electron篇
@wellwind
wellwind / rxjs_operators_by_example.md
Created October 12, 2017 14:38 — forked from btroncone/rxjs_operators_by_example.md
RxJS 5 Operators By Example
@wellwind
wellwind / Angular 6 開發環境說明.md
Last active March 10, 2022 05:34 — forked from doggy8088/Angular 18 Dev Setup.md
Angular 6 開發環境說明

Angular 6 開發環境說明

為了能讓大家能夠順利的建立起 Angular 6 開發環境,以下是需要安裝的相關軟體與安裝步驟與說明。

[ 作業系統 ]

  • Windows 7 以上版本 (更新到最新 Service Pack 版本)
  • Mac OS X 10.6 以上版本

[ 套件管理器 ( Mac OS X Only ) ]

@wellwind
wellwind / vue.md
Created February 20, 2019 14:43 — forked from oomusou/vue.md

Functional Vue Architecture

Sam Xiao, Feb.18, 2019

Web 所面臨的挑戰

後端 MVC

約在 2015 年,主流的 Web 開發架構仍以後端 MVC 為主: