Skip to content

Instantly share code, notes, and snippets.

View poychang's full-sized avatar
🏠
Stay Home & Be Health

Poy Chang poychang

🏠
Stay Home & Be Health
View GitHub Profile
@poychang
poychang / angularjs-providers-explained.md
Created March 9, 2016 00:16 — forked from demisx/angularjs-providers-explained.md
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

@poychang
poychang / angularPlugin.js
Created April 5, 2016 05:34 — forked from loicknuchel/angularPlugin.js
Angular MediaSrv : play audio with Cordova & Ionic apps
angular.module('my.cordova.plugins', ['ionic'])
// for media plugin : http://plugins.cordova.io/#/package/org.apache.cordova.media
.factory('MediaSrv', function($q, $ionicPlatform, $window){
var service = {
loadMedia: loadMedia,
getStatusMessage: getStatusMessage,
getErrorMessage: getErrorMessage
};
@poychang
poychang / github_member_developer
Created March 3, 2017 00:06 — forked from belm/github_member_developer
GitHub 多人协作开发
GitHub 多人协作开发 三种方式:
一、Fork 方式 网上介绍比较多的方式(比较大型的开源项目,比如cocos2d-x)
开发者 fork 自己生成一个独立的分支,跟主分支完全独立,pull代码后,项目维护者可根据代码质量决定是否merge代码
此方式网上方法比较多,这里不详细描述
有两种常用的方法在GitHub上建立团队合作:
二、组织 – 组织的所有者可以针对不同的代码仓库建立不同访问权限的团队。
Accounts Settings => Organizations =>Create new Organizations 新建一个组织 然后添加项目成员,根据提示设置完毕即可。
新建一个Repository 新建完毕后 进入Repository的Settings =>Collaborators 在Teams下面点击刚创建的组织 比如eveloper-51/owners
@poychang
poychang / web.config
Last active August 7, 2017 03:22 — forked from doggy8088/web.config
[部屬含有路由機制的 Angular 至 IIS] 將含有路由機制的 Angular SPA 網頁部署到 IIS 網站伺服器 #angular
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="SPA" stopProcessing="true">
<match url=".*" />
<action type="Rewrite" url="/" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
@poychang
poychang / iterm2-solarized.md
Created June 2, 2018 15:26 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@poychang
poychang / Startup.cs
Last active August 8, 2018 09:17 — forked from regisdiogo/Startup.cs
[設定 ASP.NET Core 可以序列化 Enum]- 修改 MVC 的 Json 序列化設定,使之可以將 Enum 序列化成文字併忽略 null 值 #dotnet #csharp
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
{
services.AddMvc().AddJsonOptions(options =>
{
options.SerializerSettings.Converters.Add(new Newtonsoft.Json.Converters.StringEnumConverter());
options.SerializerSettings.NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore;
});
}
@poychang
poychang / README.md
Last active August 29, 2019 09:25 — forked from doggy8088/settings.json
Poy Chang 的 VSCode 使用者設定檔

editor

  • "editor.minimap.enabled": true
    • 在捲軸上開啟 MiniMap 功能。
  • "editor.minimap.renderCharacters": false
    • 如果開啟 MiniMap 的話,預設會顯示實際字元 (字超小),根本看不清楚。
    • 將這個設定關閉,就會改顯示彩色區塊而已,這會讓 VSCode 反應速度更快。

files

@poychang
poychang / Visual Studio Code - Dark.ps1xml
Last active October 11, 2018 05:52 — forked from stuartleeks/Visual Studio Code - Dark.ps1xml
Powershell ISE theme - VS Code Dark
<?xml version="1.0" encoding="utf-16"?>
<StorableColorTheme xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Keys>
<string>ErrorForegroundColor</string>
<string>ErrorBackgroundColor</string>
<string>WarningForegroundColor</string>
<string>WarningBackgroundColor</string>
<string>VerboseForegroundColor</string>
<string>VerboseBackgroundColor</string>
<string>DebugForegroundColor</string>
@poychang
poychang / updateNpm.bat
Created November 2, 2018 03:42 — forked from johnmcase/updateNpm.bat
Update npm on windows
rem see https://github.com/coreybutler/nvm-windows/issues/300
@echo off
SETLOCAL EnableDelayedExpansion
if [%1] == [] (
echo Pass in the version you would like to install, or "latest" to install the latest npm version.
) else (
set wanted_version=%1
@poychang
poychang / Convert-PCL-to-Dotnet-Standard.md
Last active November 9, 2018 09:16 — forked from yuv4ik/README.md
[將 PCL 轉換成 .NET Standard] #dotnet #xamarin