Skip to content

Instantly share code, notes, and snippets.

View mdjhny's full-sized avatar

Fanxin Yang mdjhny

View GitHub Profile
@mdjhny
mdjhny / what-forces-layout.md
Created September 30, 2015 02:38 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@mdjhny
mdjhny / Makefile
Last active August 29, 2015 14:24 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@mdjhny
mdjhny / IconMaker
Last active August 29, 2015 14:16 — forked from jevonszmx/IconMaker
#!/usr/local/bin/php
<?php
# 注:请注意php路径,并给这个文件执行权限!!!
# 通过原始1024X1024图片来生成各种iphone ios icon,包含Content.json
#
# 使用说明:
# 1、默认生成到当前目录: IconMaker 1024.png
# 2、指定路径: IconMaker 1024.png ~/Desktop/icon/
@mdjhny
mdjhny / citydata.js
Created December 31, 2013 01:49 — forked from TooBug/citydata.js
var citydata =[
{province:'北京市',city:['东城区','西城区','朝阳区','丰台区','石景山区','海淀区','门头沟区','房山区','通州区','顺义区','昌平区','大兴区','怀柔区','平谷区','密云县','延庆县']},
{province:'天津市',city:['和平区','河东区','河西区','南开区','河北区','红桥区','东丽区','西青区','津南区','北辰区','武清区','宝坻区','滨海新区','宁河县','静海县','蓟县']},
{province:'河北省',city:['石家庄市','唐山市','秦皇岛市','邯郸市','邢台市','保定市','张家口市','承德市','沧州市','廊坊市','衡水市']},
{province:'山西省',city:['太原市','大同市','阳泉市','长治市','晋城市','朔州市','晋中市','运城市','忻州市','临汾市','吕梁市']},
{province:'内蒙古自治区',city:['呼和浩特市','包头市','乌海市','赤峰市','通辽市','鄂尔多斯市','呼伦贝尔市','巴彦淖尔市','乌兰察布市','兴安盟','锡林郭勒盟','阿拉善盟']},
{province:'辽宁省',city:['沈阳市','大连市','鞍山市','抚顺市','本溪市','丹东市','锦州市','营口市','阜新市','辽阳市','盘锦市','铁岭市','朝阳市','葫芦岛市']},
{province:'吉林省',city:['长春市','吉林市','四平市','辽源市','通化市','白山市','松原市','白城市','延边朝鲜族自治州']},
{province:'黑龙江省',city:['哈尔滨市','齐齐哈尔市','鸡西市','鹤岗市','双鸭山市','大庆市','伊春市','佳木斯市','七台河市','牡丹江市','黑河市','绥化市','大兴安岭地区']},
{province:'上海市',city:['黄浦区','徐汇区','长宁区','静安区','普陀区','闸北区','虹口区','杨浦区','闵行区','宝山区','嘉定区','浦东新区','金山区','松江区','青浦区','奉贤区','崇明县']},
@mdjhny
mdjhny / ip.py
Created August 9, 2013 09:01 — forked from anonymous/ip.py
class Node(object):
def __init__(self, value, is_start):
self.value = value
self.is_start = is_start
def __lt__(self, other):
if self.value != other.value:
return self.value < other.value
@mdjhny
mdjhny / README.md
Created January 3, 2013 11:45 — forked from wong2/README.md

人人的登录改版后,采用RSA加密后传输密码,该项目用于解决这种情况下人人的模拟登录

使用前先 pip install requests

@mdjhny
mdjhny / bash-invocation.md
Created January 6, 2012 12:35 — forked from yegle/bash-invocation.md
Bash Shell启动方式与RC脚本

Bash Shell启动方式与rc脚本

Shell的不同分类

根据启动Bash Shell的方式不同,对Shell有两种分类方式

登录Shell与非登录Shell

根据Shell的启动方式不同,可以将Shell分为