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
| sed -i 's/\x1b\[[0-9;]*m//g' reporting.log |
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
| // find file by name | |
| // e.g. find . -iname 'SomeLog*' | |
| find /path/to/file/ -iname filename |
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
| // return default value if v is null | |
| // usage: coalesce(v: r.host, default: "missing") | |
| coalesce = (v, default) => if exists v then v else default | |
| // setting timezone | |
| // needed when using aggregateWindow with period 1d and higher, or date truncate function | |
| import "timezone" | |
| option location = timezone.location(name: "Asia/Kuala_Lumpur") |
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 post(url, data) { | |
| return new Promise((resolve, reject) => { | |
| $.ajax({ | |
| url, | |
| dataType: 'json', | |
| type: 'post', | |
| contentType: 'application/json', | |
| data: JSON.stringify(data), | |
| processData: false, | |
| success: function (response, textStatus, jQxhr) { |
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
| ls -d */ | xargs -I {} bash -c "cd '{}' && npm install --only=prod" |