Skip to content

Instantly share code, notes, and snippets.

@ll1l11
ll1l11 / Dockerfile
Created June 3, 2018 18:08 — forked from patmaddox/Dockerfile
Using personal SSH keys on docker container (OS X)
RUN mkdir ~/.ssh
RUN echo 'IdentityFile ~/.ssh-local/id_rsa' > ~/.ssh/config
@ll1l11
ll1l11 / app.js
Created March 22, 2018 07:17 — forked from lsongdev/app.js
微信小程序 wx.request 封装
App({
/**
* [request description]
* @param {[type]} method [description]
* @param {[type]} url [description]
* @param {[type]} data [description]
* @param {[type]} header [description]
* @return {[type]} [description]
*/
@ll1l11
ll1l11 / dp.py
Created January 16, 2018 17:42 — forked from zed/dp.py
Find height, width of the largest rectangle containing all 0's in the matrix
#!/usr/bin/env python
"""Find height, width of the largest rectangle containing all 0's in the matrix.
The algorithm for `max_size()` is suggested by @j_random_hacker [1].
The algorithm for `max_rectangle_size()` is from [2].
The Python implementation [3] is dual licensed under CC BY-SA 3.0
and ISC license.
[1]: http://stackoverflow.com/questions/2478447/find-largest-rectangle-containing-only-zeros-in-an-nn-binary-matrix#comment5169734_4671342
@ll1l11
ll1l11 / nginx-cors.conf
Created October 19, 2016 10:44 — forked from sbuzonas/nginx-cors.conf
Nginx CORS maps
map $http_origin $allow_origin {
default "";
"~^https?://(?:[^/]*\.)?(stevebuzonas\.(?:com|local))(?::[0-9]+)?$" "$http_origin";
}
map $request_method $cors_method {
default "allowed";
"OPTIONS" "preflight";
}