Skip to content

Instantly share code, notes, and snippets.

@jinzhubaofu
jinzhubaofu / docker-compose-node-mongo.yml
Created July 8, 2018 06:31 — forked from wesleybliss/docker-compose-node-mongo.yml
Docker Compose with example App & Mongo
version: '2'
services:
myapp:
build: .
container_name: "myapp"
image: debian/latest
environment:
- NODE_ENV=development
- FOO=bar
volumes:
@jinzhubaofu
jinzhubaofu / atom-snippets.cson
Created December 29, 2016 08:05
atom snippets & keymap
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
@jinzhubaofu
jinzhubaofu / MouseEvent.spec.js
Created December 13, 2016 08:12
jasmine trigger event
/**
* @file test
* @author leon <ludafa@outlook.com>
*/
describe('document click event', () => {
it('should work', done => {
@jinzhubaofu
jinzhubaofu / udid-faq.md
Created March 2, 2016 03:17 — forked from hujunfeng/udid-faq.md
UDID, identifierForVendor and advertisingIdentifier FAQ

What's the difference between UUID, GUID and UDID?

  • UUID (Universally Unique Identifier): A sequence of 128 bits that can guarantee uniqueness across space and time, defined by [RFC 4122][rfc4122].

  • GUID (Globally Unique Identifier): Microsoft's implementation of the UUID specification; often used interchangeably with UUID.

  • UDID _(Unique Device Identifier)): A sequence of 40 hexadecimal characters that uniquely identify an iOS device (the device's Social Security Number, if you will). This value can be retrieved through iTunes, or found using UIDevice -uniqueIdentifier. Derived from hardware details like MAC address.

Is UDID deprecated?

@jinzhubaofu
jinzhubaofu / install-php.md
Last active November 18, 2015 05:00 — forked from oxUnd/install-php.md
Mac下安装php-cgi

Mac下使用 brew 安装 php-cgi

sudo xcode-select -s /Applications/Xcode.app
@jinzhubaofu
jinzhubaofu / vim find
Created January 20, 2015 07:19
vim find from hades
'Find' : 'find')<CR>
" Find file in current directory and edit it.
function! Find(name)
let l:list=system("find . -type f | grep -i '".a:name."' | perl -ne 'print \"$.\\t$_\"'")
" let l:list=system("find . -iname '".a:name."' | perl -ne 'print \"$.\\t$_\"'")
" replace above line with below one for gvim on windows
" let l:list=system("find . -name ".a:name." | perl -ne \"print qq{$.\\t$_}\"")
let l:num=strlen(substitute(l:list, "[^\n]", "", "g"))
if l:num < 1
echo "'".a:name."' not found"
@jinzhubaofu
jinzhubaofu / #104
Last active August 29, 2015 14:13
leetcode solutions
/**
* Definition for binary tree
* public class TreeNode {
* int val;
* TreeNode left;
* TreeNode right;
* TreeNode(int x) { val = x; }
* }
*/
public class Solution {
@jinzhubaofu
jinzhubaofu / amd-snippet
Last active August 29, 2015 14:13
sublimetext configs
<snippet>
<content><![CDATA[
/**
* @file ${1:file description}
* @author leon<lupengyu@baidu.com>
*/
define(function (require) {
${1:// body}
});
@jinzhubaofu
jinzhubaofu / amd的urlArgs配置
Last active August 29, 2015 14:06
edp md5renamer example
require.config({
baseUrl: '{%$tplData.feRoot%}/src',
paths: {
moye: '../dep/moye/src/ui',
etpl: '../dep/etpl/2.1.0/src/main',
Q: '../dep/q/q',
underscore: '../dep/underscore/1.6.0/src/underscore',
common: './common/'
},
packages: [{
@jinzhubaofu
jinzhubaofu / webcomponents
Last active August 29, 2015 14:03
W3C Web Components引言
W3C工作草案2013年6月6日
## 摘要
这份文档简述了Web组件的概况,是一个非标准的参考规范。它用易于理解的文字和插图总结了Web组件主要功能的规范信息。
## 2 引言
网页组件模型(Web Components)由五个部分组成: