Skip to content

Instantly share code, notes, and snippets.

View jumplee's full-sized avatar
🤩

lee jumplee

🤩
View GitHub Profile
@jumplee
jumplee / surfingkey.js
Created May 16, 2022 03:44
surfing配置
// an example to create a new mapping `ctrl-y`
api.mapkey('<ctrl-y>', 'Show me the money', function() {
api.Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
});
// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works.
api.map('gt', 'T');
api.addSearchAlias('s', 'stackoverflow', 'http://stackoverflow.com/search?q=', 's');
@jumplee
jumplee / install.sh
Created May 24, 2021 13:01 — forked from rjnienaber/install.sh
Compile ImageMagick with WEBP and HEIC support on Ubuntu 16.04
# $ lsb_release -a
# No LSB modules are available.
# Distributor ID: Ubuntu
# Description: Ubuntu 16.04.5 LTS
# Release: 16.04
# Codename: xenial
# $ uname -a
# Linux xps 4.4.0-134-generic #160-Ubuntu SMP Wed Aug 15 14:58:00 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
@jumplee
jumplee / .gitignore
Created December 24, 2019 02:34 — forked from elliot-huffman/.gitignore
A gitignore for all of your Apache Cordova needs.
# Cordova Global
plugins/
# iOS Platform
platforms/ios/build/
platforms/ios/www/
platforms/ios/cordova/console.log
*.xcuserdatad
# Android Platform
@jumplee
jumplee / hasOperate.js
Last active November 3, 2019 03:06
屏幕长时间无操作执行相应操作(回到首页等)
/**
* 屏幕长时间无操作执行相应操作(回到首页等)
* @param callback
* @param millisecond
*/
function hasOperate(callback, millisecond) {
var timer;
@jumplee
jumplee / .gitignore
Created October 4, 2019 03:48
前端项目git模版
node_modules/
dist
build
# webstorm
.idea
@jumplee
jumplee / .gitignore
Created October 4, 2019 03:46
nodejs gitignore
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
@jumplee
jumplee / clock.js
Last active July 25, 2019 03:29
执行某个函数n次并有一定时间间隔
function clock(func,times,timeout){
if(!timeout||parseInt(timeout)===NaN){
timeout=100;
}
var _counter=0;
function _(){
func();
_counter++;
if(_counter<times){
setTimeout(function(){
@jumplee
jumplee / test.swift
Last active February 1, 2019 03:51
change orientation
test{
func changeOrientation(){
guard let slf = self else {
return
}
let isPortrait=slf.isScreenPortrait()
print("isPortrait===>"+String(isPortrait))
let isPortrait=slf.isScreenPortrait()
print("isPortrait===>"+String(isPortrait))
if isPortrait {
@jumplee
jumplee / gist:8e615e46afa95a24d0e094f72fc66d8d
Created April 20, 2018 11:23 — forked from binjoo/gist:3926896
JAVASCRIPT:解决JS浮点数(小数)计算加减乘除的BUG
/**
** 加法函数,用来得到精确的加法结果
** 说明:javascript的加法结果会有误差,在两个浮点数相加的时候会比较明显。这个函数返回较为精确的加法结果。
** 调用:accAdd(arg1,arg2)
** 返回值:arg1加上arg2的精确结果
**/
function accAdd(arg1, arg2) {
var r1, r2, m, c;
try {
r1 = arg1.toString().split(".")[1].length;
#!/bin/bash
# author: koumm
# desc: auto vsftpd script
# date: 2010-07-30
# version: v1.1
# modify:
WEBROOT="/data1/htdocs/www.koumm.com"
FTP_PORT="3000"