Skip to content

Instantly share code, notes, and snippets.

View lin's full-sized avatar

Albert Lin lin

View GitHub Profile

1, based on english

2, if it's used frequently, make it less than six (four is best) characters.

wan too ree for fiv six sev eit nin ten

3, pronounce based.

4, logic based, programming based

@lin
lin / regex.md
Last active October 6, 2015 18:22

1, /(^=\s[^=\n]+\n)/gm

2, /(=\s?([^=\n\s]+)\s([^=\n]+)=)/gm

3, /(^=\s?([^=\n\s]+)[^\n]([^=\n]+)\n)/gm

4, /(^=\s?([^=\n\s]+)\n([^=\n]+)\n^=)/gm

this matches = title blog title =

@lin
lin / parse.md
Last active October 6, 2015 17:53

Input:

= title Blog Title

= subtitle Blog Subtitle =

This is a = b bold = text, and this is a = i italic = text

= math
function factorial (n){
if (n==0 || n==1){
return 1;
}
return factorial(n-1)*n;
}
//sweet
factorial = n ->
return 1 if n == 0 || 1
@lin
lin / node.js
Last active October 4, 2015 20:47
// recursive count
var count = function(tree) {
if ( tree === null ) { return 0; }
return 1 + count(tree.left) + count(tree.right);
};
// sweet
count: tree ->
return 0 unless tree
return 1 + count tree.left + count tree.right
@lin
lin / regex.md
Last active October 2, 2015 18:36

Characters:

1, .: Matches any character except line breaks. Equivalent to [^\n\r].

2, [\s\S]: A character set that can be used to match any character, including line breaks.

3, \w: Matches any word character (alphanumeric & underscore). Equivalent to [A-Za-z0-9_]

4, \W: Matches any character that is not a word character (alphanumeric & underscore). Equivalent to [^A-Za-z0-9_]

1, how to auto-complete type selection.
blog note math code ( 1 hour )
2, how to display the options tab and example area
( 3 hours )
=================
@lin
lin / first-post.md
Last active September 30, 2015 16:03
= title The Gettysburg Address =

= subtitle Gettysburg, Pennsylvania, November 19, 1863 =

= note

On June 1, 1865, Senator Charles Sumner referred to the most famous speech ever given by President Abraham Lincoln. In his eulogy on the slain president, he called the Gettysburg Address a "monumental act." He said Lincoln was mistaken that "the world will little note, nor long remember what we say here." Rather, the Bostonian remarked, "The world noted at once what he said, and will never cease to remember it. The battle itself was less important than the speech."

=
@lin
lin / list.md
Last active September 26, 2015 18:51

must

1, product page image size. (1 hour)

2, better prev and next button. (1 hour)

3, Load more on sellers' page. (1 min)

4, Load images count that is divided by 3 (5 mins).

@lin
lin / english.md
Last active September 24, 2015 18:53

1, pronunciation

  • The room is full of fools and books.

  • a lucky lock

2, communication

  • bars