$ yarn config set proxy http://username:password@host:port
$ yarn config set https-proxy http://username:password@host:port
$ npm config set proxy http://username:password@host:port
| var saveToDisk = function (fileURL, fileName) { | |
| // for non-IE | |
| if (!window.ActiveXObject) { | |
| var save = document.createElement('a'); | |
| save.href = fileURL; | |
| save.target = '_blank'; | |
| save.download = fileName || 'unknown'; | |
| var event = document.createEvent('Event'); | |
| event.initEvent('click', true, true); |
| var myConfObj = { | |
| iframeMouseOver : false | |
| } | |
| window.addEventListener('blur',function(){ | |
| if(myConfObj.iframeMouseOver){ | |
| console.log('Wow! Iframe Click!'); | |
| } | |
| }); | |
| document.getElementById('YOUR_CONTAINER_ID').addEventListener('mouseover',function(){ |
| <iframe id="iframe" src="//example.com"></iframe> | |
| <div id="message"></div> |
| $data = array("name" => "Hagrid", "age" => "36"); | |
| $data_string = json_encode($data); | |
| $ch = curl_init('http://api.local/rest/users'); | |
| curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); | |
| curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
| curl_setopt($ch, CURLOPT_HTTPHEADER, array( | |
| 'Content-Type: application/json', |
| $('#form').data('serialize',$('#form').serialize()); // On load save form current state | |
| $(window).bind('beforeunload', function(e){ | |
| if($('#form').serialize()!=$('#form').data('serialize'))return true; | |
| else e=null; // i.e; if form state change show box not. | |
| }); | |
| // ******* | |
| var initial_form_state = $('#myform').serialize(); |
| // Filter all URL's that have "/blogs/" in it AND don't have "em-foca". Result limited and pretty | |
| db.assets.find({ | |
| $and:[ | |
| { url: /\/blogs\// }, | |
| { url: {$not: /em-foca/}}, | |
| ] | |
| }).limit(2).pretty() | |
| // Filter and count all URL's that have "/blogs/" in it | |
| db.assets.find({url: /^http:\/\/(.*)\/blogs\//}).count() |
| variables: | |
| GCP_PROJECT_ID: **** | |
| GCLOUD_SERVICE_KEY: **** | |
| NPM_TOKEN: **** | |
| image: andrzj/gcloud-ci | |
| cache: | |
| untracked: true | |
| key: "$CI_BUILD_REF_NAME" |