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
| about:config -> security.fileuri.strict_origin_policy -> false |
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
| var itemList = [ | |
| {id: 5, name: "sample 5", color: "red"}, | |
| {id: 6, name: "sample 6", color: "blue"}, | |
| ]; | |
| itemList = _.map(itemList, function (item) { // Pick | |
| return _.pick(item, ['id', 'name']); | |
| }); |
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
| var list = []; | |
| $('table.resource-summary > tbody > tr').each(function(i, el) { | |
| var $tds = $(this).find('td'); | |
| var obj = { | |
| field_name: $tds.eq(0).text(), | |
| description: $tds.eq(1).text(), | |
| } | |
| list.push(obj); | |
| }); |
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
| npm install --global --production windows-build-tools | |
| npm install --global node-gyp | |
| //npm --add-python-to-path='true' --debug install --global windows-build-tools | |
| ##https://github.com/felixrieseberg/windows-build-tools/issues/33 | |
| ##https://github.com/felixrieseberg/windows-build-tools/issues/47 |
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
| moment.unix(); // Current UTC timestamp | |
| moment.utc().unix(); // Current UTC timestamp | |
| moment.utc("28-01-1992", "DD-MM-YYYY").unix(); // Convert to unix | |
| moment.unix(696556800).utc().format("DD-MM-YYYY"); // Convert to date |
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
| date_default_timezone_set("Europe/Istanbul"); | |
| $dateInUTC = "2018-02-05 13:22:56"; | |
| $time = strtotime($dateInUTC.' UTC'); | |
| echo $dateInLocal = date("Y-m-d H:i:s T", $time); // 2018-02-05 16:22:56 +03 |
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
| npm show quipu-tools@* version |
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 dogs = [ | |
| { name: 'Snickers', age: 2 }, | |
| { name: 'Hugo', age: 8 }, | |
| { name: 'Sunny', age: 1 } | |
| ]; | |
| const markup = ` | |
| <ul class="dogs"> | |
| ${dogs.map(dog => `<li>${dog.name} is ${dog.age * 7}</li>`)} | |
| </ul> |
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
| function meta(object) { | |
| return function(target) { | |
| Object.keys(object).forEach( | |
| key => target.prototype[key] = object[key] | |
| ) | |
| } | |
| } | |
| @meta({ | |
| manufacturer: 'evolas' |
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 dateTime = new Date().getTime(); | |
| const unix = Math.round(dateTime / 1000); |