Skip to content

Instantly share code, notes, and snippets.

View HTML50's full-sized avatar
🏠
Working from home

2byte HTML50

🏠
Working from home
View GitHub Profile
@HTML50
HTML50 / meng
Last active May 5, 2017 05:41
蒙与懵的区别
“懵”是第三声,音同“猛”有三个意思
1. 一时的心乱迷糊。
2. 无知:~懂。
3. 欺骗。
“蒙”读第一声 也有三个意思
1。欺骗:~骗。~哄。~事。欺上~下。
2. 昏迷,眼发黑:~头转向。
3. 胡乱猜测:瞎~。
@HTML50
HTML50 / arguments-and-array.md
Last active May 5, 2017 05:38
array and arguments's difference
function test(){
	var arg = arguments;
	var arr = [...arguments];

	console.log(typeof(arr),typeof(arg));
	console.log(arr instanceof Array,arg instanceof Array);
	console.log(Object.prototype.toString.call(arr),Object.prototype.toString.call(arg));
	console.log(Array.isArray(arr),Array.isArray(arg));
}
@HTML50
HTML50 / AAU-mouse-click-block.md
Last active May 5, 2017 05:33
aarido block mouse click
winform.setTimeout(key.press,10,13 );//异步调用key.press函数
return true; 
@HTML50
HTML50 / curried-function.md
Last active May 5, 2017 05:30
a way to understand the curried function

let's see this code

let add = x => y => x + y
add(2)(3) //5

it has two arrow '=>', the caller use two '()' to calculate 2+3. let's change the code into a easy form.

@HTML50
HTML50 / prototype-and-call.md
Created May 19, 2017 02:24
some understanding of prototype
function Person(){
this.name='person';
}

function Human(){
this.species = 'human'
}

Person.prototype = new Human();
@HTML50
HTML50 / function-constructor.md
Created June 26, 2017 01:09
function and constructor function
function Person(name){
  this.name = name;
  this.type = 'person'
}

var person =new Person('really\'O');

Person('Window.tim')
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<script src="jquery-3.1.0.js"></script>
<script type="text/javascript">
let initialized = false;
$(document).ready(function(){
$('.one').on('click',function(){
if (!initialized) {
@HTML50
HTML50 / git push password.md
Last active March 9, 2018 05:33
git push without entering password

push without password

git remote rm origin
git remote add origin (ssh)
git push --set-upstream origin master

force push when you want to override the remote repo

<div style="position: fixed;right: 0;top: 0;"><div style="border-bottom:3px solid #d7d7d7;border-top:3px solid #d7d7d7;width:410px;height:83px;background:#efefef;font-family:Ubuntu,sans-serif;font-size:2.2rem;text-shadow:#868686 1px 1px 20px;display:flex;justify-content:center;align-items:center;transform:rotate(45deg) translate(110px,-20px);"><a style="color:#3f3f3f;text-decoration: none;" onMouseOver="this.style.textDecoration='underline'" onMouseOut="this.style.textDecoration='none'" href="//github.com/html50/ping.js">star me on github</a></div></div>