Skip to content

Instantly share code, notes, and snippets.

View boboidream's full-sized avatar
🍭

boboidream boboidream

🍭
View GitHub Profile
@boboidream
boboidream / dtchange.sh
Last active May 2, 2022 02:19
中兴 B860AV1.1-T 破解优化
#!/system/bin/sh
#----------------------------------------
# Author: boboidream
# Email: me@wenboz.com
# Version: 0.0.3
# Date: 2018.08.29
#----------------------------------------
boot='iptv' # iptv | dangbei
@boboidream
boboidream / tv.py
Created August 16, 2018 17:01
tools
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# tv.py
#
# Copyright 2017 Nocmt <nocmt01@163.com>
import re
import datetime
import argparse
@boboidream
boboidream / pasteImage.js
Last active October 13, 2017 06:23
从剪切板粘贴图片
// 从剪切板粘贴图片
$document.on('paste', '.my_editor pre', function(ev) {
var clipboardData, file, item, j, k, ref1, len
var clipboardData = (ev.originalEvent || ev).clipboardData
var $my_editor = $(this).closest('.my_editor')
var text = (ev.originalEvent || ev).clipboardData.getData('Text') // 获取到纯文本
if (text) {
ev.preventDefault();
text.replace(/\n/g, '<br/>')
function camelize(str) {
return (str + "").replace(/-\D/g,
function(match) {
return match.charAt(1).toUpperCase();
});
}
camelize("border-bottom-color"); // "borderBottomColor"
function hyphenate(str) {
return (str + "").replace(/[A-Z]/g,
root = true
[*]
charset = utf-8
indent_size = 2
end_of_line = lf
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
/* 卡片阴影 */
box-shadow: 0 2px 2px 0 rgba(0,0,0,0.16), 0 0 0 1px rgba(0,0,0,0.08);
// Create dir recursively if it does not exist!
const targetDir = 'path/to/dir';
targetDir.split('/').forEach((dir, index, splits) => {
const parent = splits.slice(0, index).join('/');
const dirPath = path.resolve(parent, dir);
if (!fs.existsSync(dirPath)) {
fs.mkdirSync(dirPath);
}
});
// 三个为单独接口
function renderDept(userInfo) {
var bgs = [],
dps = [],
centers = [],
dept_compiled = '',
dept_html = ''
var getBg = function() {
@boboidream
boboidream / whichDirection.coffee
Last active May 26, 2017 12:37
javascript gist
$(window).on 'scroll', ->
nowScrollTop = $(this).scrollTop()
if nowScrollTop > 80 & nowScrollTop > lastScrollTop
$gFilter.fadeOut()
else if nowScrollTop < lastScrollTop
$gFilter.fadeIn()
lastScrollTop = nowScrollTop
# 内部滚动不影响外部 BODY 滚动