Skip to content

Instantly share code, notes, and snippets.

package main
import (
"encoding/json"
"fmt"
//"github.com/codegangsta/martini-contrib/render"
"log"
"net/http"
"os"
"github.com/go-martini/martini"
301 https://github.com/zxdrive/imouto.host
@julying
julying / gist:8182446
Last active September 22, 2016 15:41
Javascript 过滤 html 标签、属性 /* * Creator : 王子墨 * Site : http://julying.com * QQ : 316970111 * Address : China Shenzhen * */
/*
* Creator : 王子墨
* Site : http://julying.com
* QQ : 316970111
* Address : China Shenzhen
*
*/
//此方法依赖于 jQuery
// 此方法用来过滤用户输入的 html 代码,去除其中的危险 标签、标签属性等
@danpe
danpe / Sublime Text 3 Environment Variables
Created October 15, 2013 18:56
Sublime Text 3 Environment Variables
List of all Sublime Text 3 Environment Variables to be used by Snippet Makers / Plugin Developers
$SELECTION The text that was selected when the snippet was triggered.
$TM_CURRENT_LINE Content of the line the cursor was in when the snippet was triggered.
$TM_CURRENT_WORD Current word under the cursor when the snippet was triggered.
$TM_FILENAME File name of the file being edited including extension.
$TM_FILEPATH File path to the file being edited.
$TM_FULLNAME User’s user name.
$TM_LINE_INDEX Column the snippet is being inserted at, 0 based.
$TM_LINE_NUMBER Row the snippet is being inserted at, 1 based.
@ozh
ozh / gist:5774354
Created June 13, 2013 14:56
javascript check if flash supported
function is_flash_enabled() {
var hasFlash = false;
try {
var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
if( fo ) hasFlash = true;
} catch(e) {
if( navigator.mimeTypes ["application/x-shockwave-flash"] != undefined )
hasFlash = true;
}
return hasFlash;
@vishaltelangre
vishaltelangre / flash_support.js
Created April 17, 2013 17:16
Check Adobe flash plugin support for browser
// check flash support for visitor browser
function isFlashSupported() {
var hasFlash = false;
try {
var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
if(fo) hasFlash = true;
}catch(e){
if(navigator.mimeTypes ["application/x-shockwave-flash"] != undefined) {
hasFlash = true;
}
@ziadoz
ziadoz / awesome-php.md
Last active April 17, 2024 21:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.