Skip to content

Instantly share code, notes, and snippets.

View aszx87410's full-sized avatar

Huli aszx87410

View GitHub Profile
@aszx87410
aszx87410 / PUBGAME
Created August 7, 2015 02:00
Hello!
<h2 id="10進位">10進位</h2>
<p>20 = 2*10<sup>1</sup> + 0*10<sup>0</sup> <br>
25 = 2*10<sup>1</sup> + 5*10<sup>0</sup> <br>
234 = 2*10<sup>2</sup> +3*10<sup>1</sup> + 4*10<sup>0</sup></p>
<h2 id="2進位">2進位</h2>
<p>1 <br>
10 <br>
##10進位
20 = 2*10<sup>1</sup> + 0*10<sup>0</sup>
25 = 2*10<sup>1</sup> + 5*10<sup>0</sup>
234 = 2*10<sup>2</sup> +3*10<sup>1</sup> + 4*10<sup>0</sup>
##2進位
1
10
11
@aszx87410
aszx87410 / br.sh
Created April 1, 2016 04:13 — forked from dmkash/br.sh
Shell Script for tmux setup
#!/bin/sh
SESSION_NAME="big_red"
cd ~/Sites/within3/big_red
tmux has-session -t ${SESSION_NAME}
if [ $? != 0 ]
then
@aszx87410
aszx87410 / firebase_pre-request_script.js
Created January 10, 2018 09:31 — forked from moneal/firebase_pre-request_script.js
Postman pre-request script to create a Firebase authentication JWT header.
/**
* This script expects the global variables 'refresh_token' and 'firebase_api_key' to be set. 'firebase_api_key' can be found
* in the Firebase console under project settings then 'Web API Key'.
* 'refresh_token' as to be gathered from watching the network requests to https://securetoken.googleapis.com/v1/token from
* your Firebase app, look for the formdata values
*
* If all the data is found it makes a request to get a new token and sets a 'auth_jwt' environment variable and updates the
* global 'refresh_token'.
*
* Requests that need authentication should have a header with a key of 'Authentication' and value of '{{auth_jwt}}'
@aszx87410
aszx87410 / firebase_pre-request_script.js
Created January 10, 2018 09:31 — forked from moneal/firebase_pre-request_script.js
Postman pre-request script to create a Firebase authentication JWT header.
/**
* This script expects the global variables 'refresh_token' and 'firebase_api_key' to be set. 'firebase_api_key' can be found
* in the Firebase console under project settings then 'Web API Key'.
* 'refresh_token' as to be gathered from watching the network requests to https://securetoken.googleapis.com/v1/token from
* your Firebase app, look for the formdata values
*
* If all the data is found it makes a request to get a new token and sets a 'auth_jwt' environment variable and updates the
* global 'refresh_token'.
*
* Requests that need authentication should have a header with a key of 'Authentication' and value of '{{auth_jwt}}'
//.eslintrc
{
"env": {
"browser": true,
"es6": true,
"node": true,
"jest": true
},
"parser": "babel-eslint",
@aszx87410
aszx87410 / lidemy.md
Created February 5, 2019 08:10
qa 回答

能分享自學成為後端工程師的案例經驗嗎?

雖然我自己的課程是前後端都有教,而且兩者的比重其實前端多一些而已,但不知道是不是因為我自己是前端工程師的關係,我的學生們都對前端比較有興趣一點,所以大多數出去以後都在找前端工程師的工作。

找後端的應該也是有但還沒有成功案例,如果你是問自學而不是我的學生的案例的話,我這邊沒有案例可以分享,可能要自己 google 找找了。

胡立大大,請問你覺得寫程式作為一份工作,什麼是支持你一直走下去的動力?

熱情吧,從小時候就知道對寫程式很有興趣,有了熱情就能夠做下去,做下去就會越來越進步越來越專業然後得到相對的報酬或是讚賞 有了讚賞跟報酬以後就會越有自信繼續走下去,大概就是這樣的一個正向循環

@aszx87410
aszx87410 / isPrime.js
Created May 9, 2019 13:49
判斷質數錯誤範例
function isPrime(n) {
if (n === 1) return false;
for (let i = 2; i < n; i++) {
if (n % i === 0) {
return false;
} else {
return true;
}
}
}
@aszx87410
aszx87410 / mediumUsersFollowedByCount.js
Created June 30, 2019 21:32 — forked from newhouse/mediumUsersFollowedByCount.js
Medium API: get number of followers for User
/**
* Example of how to get the number of followers for a Medium.com User.
*
*
* Related links:
* https://github.com/Medium/medium-api-docs/issues/30#issuecomment-227911763
* https://github.com/Medium/medium-api-docs/issues/73
*/
// LODASH
@aszx87410
aszx87410 / README.md
Last active December 8, 2023 21:59
let vs var by investigating the bytecode generated by Node.js

It's the reply to the question raised by @getify on his twitter:

here's a variation on the question... will JS engines exhibit much performance difference between these two loops?

for (var i = 0; i < 100000000; i++) {
   // do some stuff, but not closure
}

for (let i = 0; i < 100000000; i++) {