Legend:
- ✏️ method changes
this. - 🔒 method does not change
this.
Array<T>.prototype.*:
concat(...items: Array): T[]🔒 ES3
| #install brotli | |
| sudo apt-get install brotli | |
| #check nginx version | |
| nginx -V | |
| #download nginx source | |
| wget http://nginx.org/download/nginx-1.14.1.tar.gz | |
| #extract the source | |
| tar -xzvf nginx-1.14.1.tar.gz |
| name: Delete node_modules on merge | |
| on: | |
| push: | |
| branches: | |
| - [ $default-branch ] | |
| jobs: | |
| delete-modules: | |
| runs-on: ubuntu-latest | |
| steps: |
| # set a proxy | |
| set HTTP_PROXY= | |
| set HTTPS_PROXY=%HTTP_PROXY% | |
| npm config set proxy %HTTP_PROXY% | |
| npm config set https.proxy %HTTPS_PROXY% | |
| npm config set https-proxy %HTTPS_PROXY% | |
| git config --global http.proxy %HTTP_PROXY% | |
| git config --global https.proxy %HTTPS_PROXY% | |
| # unset proxy |
| --log_gc (Log heap samples on garbage collection for the hp2ps tool.) | |
| type: bool default: false | |
| --expose_gc (expose gc extension) | |
| type: bool default: false | |
| --max_new_space_size (max size of the new generation (in kBytes)) | |
| type: int default: 0 | |
| --max_old_space_size (max size of the old generation (in Mbytes)) | |
| type: int default: 0 | |
| --max_executable_size (max size of executable memory (in Mbytes)) | |
| type: int default: 0 |
| var flattenObject = function(ob) { | |
| var toReturn = {}; | |
| for (var i in ob) { | |
| if (!ob.hasOwnProperty(i)) continue; | |
| if ((typeof ob[i]) == 'object') { | |
| var flatObject = flattenObject(ob[i]); | |
| for (var x in flatObject) { | |
| if (!flatObject.hasOwnProperty(x)) continue; |
| /* | |
| * Flatten Object @gdibble: Inspired by https://gist.github.com/penguinboy/762197 | |
| * input: { 'a':{ 'b':{ 'b2':2 }, 'c':{ 'c2':2, 'c3':3 } } } | |
| * output: { 'a.b.b2':2, 'a.c.c2':2, 'a.c.c3':3 } | |
| */ | |
| var flattenObject = function(ob) { | |
| var toReturn = {}; | |
| var flatObject; | |
| for (var i in ob) { | |
| if (!ob.hasOwnProperty(i)) { |
| function flattenObject(ob) { | |
| let toReturn = {}; | |
| let flatObject; | |
| for (let i in ob) { | |
| console.log(i+ ' ' + typeof(ob[i])); | |
| if (!ob.hasOwnProperty(i)) { | |
| continue; | |
| } | |
| //Exclude arrays from the final result | |
| //Check this http://stackoverflow.com/questions/4775722/check-if-object-is-array |
| var YQL = require('yql'); | |
| var query = new YQL('select * from weather.forecast where (location = 94089)'); | |
| query.exec(function(err, data) { | |
| var location = data.query.results.channel.location; | |
| var condition = data.query.results.channel.item.condition; | |
| console.log('The current weather in ' + location.city + ', ' + location.region + ' is ' + condition.temp + ' degrees.'); | |
| }); |