Skip to content

Instantly share code, notes, and snippets.

<a href="javascript:void(window.open('https://www.sfbuy.com/account/register'));">test</a>
/* Based on Twitter Bootstrap style http://twitter.github.com/bootstrap/ */
.prettyprint .com { color: #93a1a1; }
.prettyprint .lit { color: #195f91; }
.prettyprint .pun, .prettyprint .opn, .prettyprint .clo { color: #93a1a1; }
.prettyprint .fun { color: #dc322f; }
.prettyprint .str, .prettyprint .atv { color: #D14; }
.prettyprint .kwd, .prettyprint .linenums .tag { color: #1e347b; }
.prettyprint .typ, .prettyprint .atn, .prettyprint .dec, .prettyprint .var { color: teal; }
.prettyprint .pln { color: #48484c; }
sudo dtrace -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0));
var prefix = (/mozilla/.test(navigator.userAgent.toLowerCase()) &&
!/webkit/.test(navigator.userAgent.toLowerCase())) ? '-moz-' :
(/webkit/.test(navigator.userAgent.toLowerCase())) ? '-webkit-' :
(/msie/.test(navigator.userAgent.toLowerCase())) ? '-ms-' :
(/opera/.test(navigator.userAgent.toLowerCase())) ? '-o-' : '';
body {
font-family: Lucida Grande, Helvetica Neue, Helvetica, Arial, sans-serif;
text-align: center;
margin-top: 20px;
font-size: 14px;
color: #333;
}
span {
display: block;
/*
<span>Loading</span>
<span class="l-1"></span>
<span class="l-2"></span>
<span class="l-3"></span>
<span class="l-4"></span>
<span class="l-5"></span>
<span class="l-6"></span>
*/
body {
html{
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: grayscale(100%);
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale");
filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
}
@minwe
minwe / is360se.js
Created May 22, 2014 02:27
360 浏览器检测
// 来自 http://se.360.cn/common/qihoo_ie6_tips.js
function is360se() {
var ret = false;
ua = navigator.userAgent.toLowerCase();
if (ua.indexOf("chrome") > -1) {
ret = (ua.indexOf("qqbrowser") > -1 || ua.indexOf(" se ") > -1 || ua.indexOf("360ee") == -1) ? false : true
}
try {
if (window.external && window.external.twGetRunPath) {
@minwe
minwe / define.php
Created June 10, 2014 05:36 — forked from KATT/define.php
<?php
/**
* Check if content is JSON
*
* @param string $content
* @return boolean
*/
function w3_is_json($content) {
return json_decode($content) !== NULL;
}
@minwe
minwe / json-api_singletons_api.php
Created June 10, 2014 05:49
json-api/singletons/
<?php
class JSON_API {
function __construct() {
$this->query = new JSON_API_Query();
$this->introspector = new JSON_API_Introspector();
$this->response = new JSON_API_Response();
add_action('template_redirect', array(&$this, 'template_redirect'));
add_action('admin_menu', array(&$this, 'admin_menu'));