This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Go to a profile, open javascript console (cmd + alt + j) and paste the following code | |
| // or you can save it in handy snippet https://developers.google.com/web/tools/chrome-devtools/javascript/snippets | |
| // Update this selectors as LinkedIn's layout is updated | |
| const endorseBtnSelector = '.pv-skill-entity__featured-endorse-button-shared'; | |
| const openSkillsSectionBtnSelector = '.pv-skills-section__additional-skills'; | |
| const body = document.body, | |
| html = document.documentElement; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const promisify = (fn) => (...args) => new Promise((resolve, reject) => { | |
| fn.apply(insight, [...args, (err, ...args) => { | |
| if (err) return reject(err); | |
| resolve.apply(this, args); | |
| }]); | |
| }); | |
| // example: | |
| // insight.getUnspentUtxosPromise = promisify(insight.getUnspentUtxos); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://graph.facebook.com/{facebookId}/picture?type=large&width=720&height=720 | |
| source: https://developers.facebook.com/docs/graph-api/reference/user/picture/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // log the `rnd` result in the console using all three async techniques. | |
| // You can only call console.log inside the `main` function. | |
| const randomNumber = () => { | |
| return Math.random(); | |
| } | |
| // 1. Make it wait for 1 sec. with `setTimeout` and log it on main function | |
| const timeoutRandomNumber = (func, cb) => { | |
| return setTimeout(() => func(), 1000) |
NewerOlder