Skip to content

Instantly share code, notes, and snippets.

View fszlin's full-sized avatar
🎯
Focusing

Eddie Lin fszlin

🎯
Focusing
View GitHub Profile
certes account new email@example.com
var href = $(this).prop('href');
if (href && href.match(/http[s]?\:\/\//i) && // is a link
!href.match(/[\?\&]fullSite=1/i) && // haven't inject fullSite marker
href.indexOf('://' + window.location.host) >= 0) { // navigating within CP
href += href.indexOf('?') > 0 ? '&fullSite=1' : '?fullSite=1';
$(this).attr('href', href);
}
@fszlin
fszlin / MockExtensions.cs
Created February 1, 2018 18:11
mock with callback for interfaces
using Moq;
using System;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Runtime.CompilerServices;
namespace Mocks
{
public static class MockExtensions
@fszlin
fszlin / gist:3f65129411bb2dd2c7a0fc6e2aa4beb0
Last active August 23, 2017 17:57 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@fszlin
fszlin / PublishWebApp.ps1
Created May 19, 2016 15:24
Deploy ASP.NET Core 1.0 RC2 apps to Azure web apps
# Deploy ASP.NET Core 1.0 RC2 apps to Azure web apps
# based on PublishAspnetWebsite.ps1(https://www.visualstudio.com/docs/release/examples/azure/aspnet-core10-azure-web-apps)
#
#PublishWebApp.ps1 `
# -websiteName AzureApp `
# -slotName staging `
# -publishScript $(Build.SourcesDirectory)/src/ProjectWeb/Properties/PublishProfiles/Profile-publish.ps1 `
# -pubProfilePath $(Build.SourcesDirectory)/src/ProjectWeb/Properties/PublishProfiles/Profile.pubxml `
# -packOutput $(Build.StagingDirectory)/ProjectWeb
#
@fszlin
fszlin / SWebSocket.cpp
Created November 20, 2015 20:26 — forked from ysugimoto/SWebSocket.cpp
cocos2d-x simple websocket wrapper class
//
// SWebSocket.cpp
//
// Created by Yoshiaki Sugimoto on 2014/08/04.
//
//
#include "SWebSocket.h"
USING_NS_CC;
@fszlin
fszlin / Hubs.tt
Created June 20, 2014 16:58 — forked from htuomola/Hubs.tt
<#@ template debug="true" hostspecific="true" language="C#" #>
<#@ output extension=".d.ts" #>
<# /* Update this line to match your version of SignalR */ #>
<#@ assembly name="$(SolutionDir)\packages\Microsoft.AspNet.SignalR.Core.2.0.0\lib\net45\Microsoft.AspNet.SignalR.Core.dll" #>
<# /* Load the current project's DLL to make sure the DefaultHubManager can find things */ #>
<#@ assembly name="$(TargetPath)" #>
<#@ assembly name="System.Core" #>
<#@ assembly name="System.Web" #>
<#@ assembly name="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" #>
<#@ assembly name="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" #>