Skip to content

Instantly share code, notes, and snippets.

fhefh2015

Block or report user

Report or block fhefh2015

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fhefh2015
fhefh2015 / Mojave-nfs.md
Created May 6, 2019 — forked from LauLaman/Mojave-nfs.md
Vagrant nfs mount Mac OS X Mojave
View Mojave-nfs.md
  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 Feb 23, 2019
H5裁剪图片上传
View drop.html
<!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 Feb 22, 2019
用Laravel的artisan命令执行php脚本
View f.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 Dec 28, 2018
html2canvas.js截图只截取当前可视区域问题
View 1.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 Oct 30, 2018 — forked from samkahchiin/macvim
- How to set the default font size in macvim
View 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 Sep 26, 2018 — forked from iansltx/MultiPartFromStrings.php
Multipart file uploads in PHP from strings
View MultiPartFromStrings.php
/**
* 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
View page.php
class Page_Link
{
var $page_max = 10; //一组页码的最大数
var $page_num = 10; //总页数
var $length = 20; //一页的数据条数
var $isNextPage = true;
var $isFirstPage = false;
View page.php
/**
* 分页类
* 使用方式:
* $page = new Page();
* $page->init(1000, 20);
* $page->setNotActiveTemplate('<span> {a} </span>');
* $page->setActiveTemplate('{a}');
* echo $page->show();
*
*
@fhefh2015
fhefh2015 / 1.html
Created Aug 10, 2018
css3 H5箭头
View 1.html
<style>
/*箭头 开始*/
@-webkit-keyframes start {
0%,30% {
opacity: 0;
-webkit-transform: translateY(10px);
}
60% {
opacity: 1;
@fhefh2015
fhefh2015 / alfred.md
Created Jul 26, 2018
Alfred 每次开机运行后都提示是否允许访问通讯录
View alfred.md

在终端输入:

sudo codesign -f -d -s - /Applications/Alfred\ 3.app/Contents/Frameworks/Alfred\ Framework.framework/Versions/A/Alfred\ Framework
You can’t perform that action at this time.