yt-dlp.conf
#!/bin/bash | |
# This script adapted from an older post on StackOverflow by user fieldju | |
# https://stackoverflow.com/questions/36478741/installing-oracle-jdk-on-windows-subsystem-for-linux | |
# The script was for JDK 8. | |
# Due to major changes with JDK 11 (no JRE, no Derby, Unlimited Strength included), it was necessary to update the entire script. | |
set -ex | |
# UPDATE THESE URLs (this one updated as of 2019-03-06) | |
export JDK_URL=http://download.oracle.com/otn-pub/java/jdk/11.0.2+9/f51449fcd52f4d52b93a989c5c56ed3c/jdk-11.0.2_linux-x64_bin.tar.gz |
/** | |
* searches deep into an object recursively... | |
* @param {Object} obj object to be searched | |
* @param {any} searchValue the value/key to search for | |
* @param {Object} [options] | |
* @param {boolean} options.[searchKeys] whether to search object keys as well as values. Defaults to `true` if `serchValue` is a string, `false` otherwise. | |
* @param {number} options.[maxDepth=20] maximum recursion depth (to avoid "Maximum call stack size exceeded") | |
* @returns {string[]} Paths on the object to the matching results | |
*/ | |
const findPaths = ( |
When you create a npm package, remember it might be used in a browser or a server, or even a command line utility… For each package you create, please pay attention at what it will be used for:
- Is it going to be used as a dependency to a nodejs application that is not bundled? (e.g. command line utilities)
- Is it going to be used as a dependency to a nodejs application that is bundled? (e.g. AWS Lambdas)
- Is it going to be used as a dependency to a browser application (always bundled)?.
- In cases 2) and 3) you want to allow for tree shaking.
- In cases 1) and 2) you want to benefit from the "ES6"/"ES next" features supported natively by nodejs.
- In case 3) you also want to benefit from the native support of "ES6" from your browser.
var customer = JSON.parse(responseBody); | |
if (customer.id === undefined) { | |
// No customer was returned, so don't run the rest of the collection | |
postman.setNextRequest(null); | |
} | |
else { | |
// Save the customer ID to a Postman environment variable | |
postman.setEnvironmentVariable("cust_id", customer.id); |
To make Pageant automatically run and load keys at startup: | |
- Find the location of pageant.exe | |
- Windows key + R to open the 'run' dialog box | |
- Type: 'shell:startup' in the dialog box | |
- Create a shortcut to the pageant.exe and put into this startup folder. |
//unit test | |
it('Pull with commit conflict', function() { | |
var key = totest.vcs.credentials(creds.pubkey, creds.privkey, creds.passphrase); | |
var key2 = totest.vcs.credentials(creds.pubkey, creds.privkey, creds.passphrase); | |
var key3 = totest.vcs.credentials(creds.pubkey, creds.privkey, creds.passphrase); | |
var repo; | |
var oldrepo; | |
var newoid; | |
var newline = 'modified on' + Date.now()+'\n'; |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
This CSS stylesheet allows you to preview markdown files in VSCode using GitHub's mardown theme. This CSS was taken directly from the official GitHub Markdown repo. I replaced their top-level .markdown-body
class with the body
tag so it would work in VSCode, and added styling for the html
tag to match GitHub's fixed-width container.
-
Copy the CSS file to your computer
Copy thegithub-markdown.css
file below to your computer. You can put it anywhere you want, but I chose to put it in the same folder as my VSCode settings file. -
Edit your VSCode settings
If you want to use this theme for all of your projects, then edit your User Settings file. If you just want to use this them
A quick guide on how to setup Node.js development environment.
nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.
- Open new Terminal window.