Skip to content

Instantly share code, notes, and snippets.

@icyflash
icyflash / jquery.photoswipe.js
Created November 13, 2015 06:43 — forked from kshnurov/jquery.photoswipe.js
PhotoSwipe: init from DOM using jQuery
(function( $ ) {
$.fn.photoswipe = function(options){
var galleries = [],
_options = options;
var init = function($this){
galleries = [];
$this.each(function(i, gallery){
galleries.push({
id: i,
@icyflash
icyflash / gist:3929845
Created October 22, 2012 05:32
WeixinShare
function WeiXinShareBtn() {
if (typeof WeixinJSBridge == "undefined") {
alert("请先通过微信搜索 iwemedia 添加玩媒为好友,通过微信分享文章 :) ");
}else {
WeixinJSBridge.invoke('shareTimeline', { "title": "玩媒", "link": "http://www.wmi.me", "desc": "玩媒采用专业算法挖掘自媒体平台中的非结构化内容,根据传播力和可信度等相关因素,为财经用户提供精彩信息引爆点和决策数据价值点。玩转自媒体,策动人际圈影响力!", "img_url": "http://www.wmi.me/Content/images/apple-touch-icon.png" });
}
}
@icyflash
icyflash / gist:3799562
Created September 28, 2012 12:37
Asp.net MVC Area Mulit logon
public class AreaAuthorize : AuthorizeAttribute
{
public string Area { get; set; }
public string Url { get; set; }
public override void OnAuthorization(AuthorizationContext filterContext)
{
//AllowAnonymousAttribute added in MVC4
if (!filterContext.ActionDescriptor.IsDefined(typeof(AllowAnonymousAttribute), true) &&
!filterContext.ActionDescriptor.ControllerDescriptor.IsDefined(typeof(AllowAnonymousAttribute), true))