Skip to content

Instantly share code, notes, and snippets.

View genffy's full-sized avatar
♥️
peace

Zhengfei Li genffy

♥️
peace
View GitHub Profile
@genffy
genffy / how-to-force-a-file-download-with-ningx.md
Created November 21, 2016 00:44 — forked from nepsilon/how-to-force-a-file-download-with-ningx.md
How to force a file download with Nginx? — First published in fullweb.io issue #73

How to force a file download with Nginx?

In short:

add_header Content-Disposition 'attachment; filename="foo.txt"';

We’re just adding a Content-Disposition header in the response. You can specify the file name, here we’re using foo.txt.

@genffy
genffy / 悦跑圈Api用法.md
Created September 27, 2016 17:22 — forked from kkmike999/悦跑圈Api用法.md
悦跑圈Api代理用法

Http api使用方法

示例代码+解说:

ps.代码仅用于演示,与实际代码出入

json数据

{
    "ret": "0",
    "msg": "成功",
@genffy
genffy / README.md
Created May 18, 2016 10:38 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@genffy
genffy / 0_reuse_code.js
Created September 29, 2015 06:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console