Skip to content

Instantly share code, notes, and snippets.

@cary929
cary929 / base64.html
Created July 30, 2021 03:17 — forked from huanggm/base64.html
收藏两种1像素图片的base64编码
<!-- 1像素透明 -->
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">
<!-- 1像素黑色 -->
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=">
<a href="http://proger.i-forge.net/%D0%9A%D0%BE%D0%BC%D0%BF%D1%8C%D1%8E%D1%82%D0%B5%D1%80/[20121112]%20The%20smallest%20transparent%20pixel.html">参考网址</a>
@cary929
cary929 / README.md
Created March 18, 2021 17:09 — forked from mau21mau/README.md
Configure Celery + Supervisor With Django
<?php
/*
Plugin Name: Custom List Table With Database Example
Description: A highly documented plugin that demonstrates how to create custom admin list-tables from database using WP_List_Table class.
Version: 1.0
Author: Viramgami Jignesh
Author URI: https://github.com/viramgamijignesh/
License: GPL2
*/
@cary929
cary929 / wechat-browser-detect.js
Created May 25, 2016 16:28 — forked from loo2k/wechat-browser-detect.js
JavaScript 判断是否微信内置浏览器
// 使用 userAgent 判断是否微信内置浏览器
// 不推荐使用 用户可能会自行修改浏览器的 userAgent
if( navigator.userAgent.toLowerCase().indexOf('micromessenger') > -1 || typeof navgator.wxuserAgent !== "undefined" ) {
return true;
}
// 使用微信 JS 对象判断是否微信内置浏览器
// 建议使用此方法进行判断
if( typeof WeixinJSBridge !== "undefined" ) {
return true;
@cary929
cary929 / interval.js
Created May 13, 2016 08:23 — forked from manast/interval.js
Accurate Javascript setInterval replacement
function interval(duration, fn){
this.baseline = undefined
this.run = function(){
if(this.baseline === undefined){
this.baseline = new Date().getTime()
}
fn()
var end = new Date().getTime()
this.baseline += duration