Skip to content

Instantly share code, notes, and snippets.

Avatar
🐈
Fish eating

techmoe dev-techmoe

🐈
Fish eating
View GitHub Profile
@dev-techmoe
dev-techmoe / is_serialized.php
Last active Jan 25, 2016
判断指定字符串是否为序列化字符串
View is_serialized.php
<?php
function is_serialized( $data ) {
$data = trim( $data );
if ( 'N;' == $data )
return true;
if ( !preg_match( '/^([adObis]):/', $data, $badions ) )
return false;
switch ( $badions[1] ) {
case 'a' :
case 'O' :
@dev-techmoe
dev-techmoe / jq_dom_exist.js
Created Feb 27, 2016
jquery插件,判断指定dom是否存在
View jq_dom_exist.js
/**
* 判断dom是否存在的jq插件
* USEAGE: $(selector).exist() (return true or false)
*/
(function($) {
$.fn.exist = function(){
if($(this).length>=1){
return true;
}
return false;
@dev-techmoe
dev-techmoe / 0_reuse_code.js
Created Oct 31, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View structure_of_sentry_webhook's_callback.json
METHOD: POST
From 173.193.138.222, 108.162.221.102
Accept-Encoding: gzip
Cf-Connecting-Ip: 173.193.138.222
Host: requestb.in
User-Agent: sentry/8.14.0.dev0 (https://sentry.io)
Total-Route-Time: 0
Accept: */\*
View jQuery-plugin-authoring.md
译自 jQuery Plugins / Authoring

创建插件


看来 jQuery 你已经用得很爽了,想学习如何自己编写插件。非常好,这篇文档正适合你。用插件和方法来扩展 jQuery 非常强大,把最聪明的功能封装到插件中可以为你及团队节省大量开发时间。

开始

@dev-techmoe
dev-techmoe / mgDuplicateFilesClean.less
Created Aug 13, 2017
stylesheet of mgDuplicateFilesClean 萌娘共享-重复文件列表js小工具的样式
View mgDuplicateFilesClean.less
.duplicateFilesDeletion-context {
.duplicateFilesDeletion-container {
min-height: 300px;
position: relative;
}
.duplicateFilesDeletion-content-page {
display: none;
}
View README.md

thin_vector

某个下午没事闲的写的mediawiki vector的一个userstyle

View right_click_menu_get_file_hash.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\文件哈希校验]
"SubCommands"="MACTripleDES;MD5;RIPEMD160;SHA1;SHA256;SHA384;SHA512"
"MUIVerb"="Get Hash"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\MACTripleDES]
@dev-techmoe
dev-techmoe / v2ray_chinaip_router.json
Last active Jul 28, 2020
使用v2ray区分国内外流量实现自动分流
View v2ray_chinaip_router.json
{
"inbound": {
"port": 1081,
"listen": "0.0.0.0",
"protocol": "socks",
"settings": {
"auth": "noauth"
}
},
"inboundDetour": [
@dev-techmoe
dev-techmoe / README.md
Last active Aug 23, 2018
npm-no-bin-link-command-patch
View README.md

npm-no-bin-link-command-patch

This script will help you create scripts to fix the problem caused by enable no-bin-link option of NPM or Yarn.

Usage

Put command_patch.js to your work dir, and run it.

node command_patch.js

And it will create scripts that is associate to CLI scripts of every modules automatic.
All command of modules in your workdir will be usable after that.

You can’t perform that action at this time.