Skip to content

Instantly share code, notes, and snippets.

View githubxiaowen's full-sized avatar
💭
I may be slow to respond.

萧文 githubxiaowen

💭
I may be slow to respond.
  • Beijing China
View GitHub Profile
@githubxiaowen
githubxiaowen / v8.md
Created August 13, 2019 04:58 — forked from kevincennis/v8.md
V8 Installation and d8 shell usage

Installing V8 on a Mac

Prerequisites

  • Install Xcode (Avaliable on the Mac App Store)
  • Install Xcode Command Line Tools (Preferences > Downloads)
  • Install depot_tools
    • git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
    • sudo nano ~/.bash_profile
  • Add export PATH=/path/to/depot_tools:"$PATH" (it's important that depot_tools comes first here)
@githubxiaowen
githubxiaowen / starUML.md
Created April 8, 2018 05:09 — forked from trandaison/starUML.md
Get full version of StarUML

StarUML

Download: StarUML.io

Crack

Source: jorgeancal

After installing StartUML successfully, modify LicenseManagerDomain.js as follow:

/**
@githubxiaowen
githubxiaowen / what-forces-layout.md
Created September 7, 2017 04:34 — 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()
@githubxiaowen
githubxiaowen / array_dupplicate_counter.js
Created June 21, 2016 10:00 — forked from ralphcrisostomo/array_dupplicate_counter.js
Javascript: Count duplicates in an array
/**
Problem:
You have a javascript array that likely has some duplicate values and you would like a count of those values.
Solution:
Try this schnippet out.
*/
@githubxiaowen
githubxiaowen / gist:b563b7a92af01e6a0ac3df39ae355ab4
Created May 4, 2016 01:41 — forked from harryhow/gist:829b902742e07fd1002f
Regex validate for China's mobile number - update on Aug 2015
- (BOOL)validatePhoneChina:(NSString *)mobileNum
{
/**
* 手机号码
* 移动:134[0-8],135,136,137,138,139,147,150,151,152,157,158,159,178,182,183,184,187,188
* 联通:130,131,132,145,152,155,156,176,185,186
* 电信:133,1349,153,180,189,177
*/
//NSString * MOBILE = @"^1(3[0-9]|5[0-35-9]|8[025-9])\\d{8}$"; // TODO: can be removed, redundant
NSString * CM = @"^1(34[0-8]|(3[5-9]|47|5[0127-9]|78|8[23478])\\d)\\d{7}$";
@githubxiaowen
githubxiaowen / frontendDevlopmentBookmarks.md
Created February 28, 2016 03:06 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.