Skip to content

Instantly share code, notes, and snippets.

https://3gimg.qq.com/lightmap/components/locationCluster/index.html?type=0&marker=coord:39.974386,116.787409;coordtype:1;title:豪杰装饰建材;addr:河北省廊坊市三河市冯家府神威北路燕郊精工园北300米&key=YYFBZ-EGVWU-DSCVO-BLAPO-5XJWQ-N5BVS&referer=myapp
@fhefh2015
fhefh2015 / Mojave-nfs.md
Created May 6, 2019 13:44 — forked from LauLaman/Mojave-nfs.md
Vagrant nfs mount Mac OS X Mojave
  1. Mac OS X system settings > Security & Privacy > privacy tab

  2. Select Full Disk Access and click plus icon.

  3. Add terminal in the list ( in my case iTerm)

  4. Restart iTerm

  5. Run command in iterm: $ cd /private/etc && sudo touch ./exports

  6. Start virtual machine trough vargrant: Profit

@fhefh2015
fhefh2015 / drop.html
Created February 23, 2019 05:49
H5裁剪图片上传
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<meta name="viewport" content="target-densitydpi=device-dpi,width=640,user-scalable=no"/>
<style>
html {
-webkit-text-size-adjust: none;
-webkit-user-select: none;
@fhefh2015
fhefh2015 / f.php
Created February 22, 2019 07:19
用Laravel的artisan命令执行php脚本
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputArgument;
class RunFile extends Command
{
/**
@fhefh2015
fhefh2015 / 1.js
Created December 28, 2018 09:30
html2canvas.js截图只截取当前可视区域问题
$("#downpdf").on("click", function() {
//获取节点高度,后面为克隆节点设置高度。
var height = $(TargetNode).height()
//克隆节点,默认为false,不复制方法属性,为true是全部复制。
var cloneDom = $(TargetNode).clone(true);
//设置克隆节点的css属性,因为之前的层级为0,我们只需要比被克隆的节点层级低即可。
cloneDom.css({
"background-color": "white",
"position": "absolute",
"top": "0px",
@fhefh2015
fhefh2015 / macvim
Created October 30, 2018 12:12 — forked from samkahchiin/macvim
- How to set the default font size in macvim
# Open Terminal
vim ~/.vimrc
# Mac OS-X -> .vimrc ; Window -> .gvimrc
# Add it in the file and adjust the font size (h12) accordingly
set guifont=Menlo\ Regular:h15
@fhefh2015
fhefh2015 / MultiPartFromStrings.php
Last active November 27, 2019 02:57 — forked from iansltx/MultiPartFromStrings.php
Multipart file uploads in PHP from strings
/**
* PHP's curl extension won't let you pass in strings as multipart file upload bodies; you
* have to direct it at an existing file (either with deprecated @ syntax or the CURLFile
* type). You can use php://temp to get around this for one file, but if you want to upload
* multiple files then you've got a bit more work.
*
* This function manually constructs the multipart request body from strings and injects it
* into the supplied curl handle, with no need to touch the file system.
*
* @param $ch resource curl handle
@fhefh2015
fhefh2015 / page.php
Created September 13, 2018 07:54
php分页类2
class Page_Link
{
var $page_max = 10; //一组页码的最大数
var $page_num = 10; //总页数
var $length = 20; //一页的数据条数
var $isNextPage = true;
var $isFirstPage = false;
@fhefh2015
fhefh2015 / page.php
Created September 13, 2018 07:54
PHP分页类1
/**
* 分页类
* 使用方式:
* $page = new Page();
* $page->init(1000, 20);
* $page->setNotActiveTemplate('<span> {a} </span>');
* $page->setActiveTemplate('{a}');
* echo $page->show();
*
*
@fhefh2015
fhefh2015 / 1.html
Created August 10, 2018 07:44
css3 H5箭头
<style>
/*箭头 开始*/
@-webkit-keyframes start {
0%,30% {
opacity: 0;
-webkit-transform: translateY(10px);
}
60% {
opacity: 1;