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
methods: { | |
waitFor: async function (ms) { | |
await new Promise(r => setTimeout(r, ms)) | |
}, | |
asyncForEach: async function (array, callback) { | |
for (let i = 0; i < array.length; i++) { | |
await callback(array[i], i, array); | |
} | |
}, | |
start: async function () { |
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
Настройка ежедневного бекапа базы postgresql | |
sudo nano /root/.pgpass | |
# подставляем свои данные и добавляем строку | |
hostname:port:database:username:password | |
sudo chmod 600 /root/.pgpass | |
sudo crontab -e | |
# добавляем строку. Дамп будет создаваться ежедневно в 3:15 |
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
// Using the HTML5 File API and any JavaScript crypto library, how can I generate an MD5 hash of the file? | |
// This goes there: | |
var reader = new FileReader(); | |
reader.onload = function(e) { | |
var contents = e.target.result; | |
// This goes here: | |
var hash = CryptoJS.MD5(CryptoJS.enc.Latin1.parse(contents)); |
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
http://bbcmedia.ic.llnwd.net:80/stream/bbcmedia_radio1_mf_p | |
http://bbcmedia.ic.llnwd.net:80/stream/bbcmedia_radio2_mf_p | |
http://bbcmedia.ic.llnwd.net:80/stream/bbcmedia_radio3_mf_p | |
http://bbcmedia.ic.llnwd.net:80/stream/bbcmedia_radio4fm_mf_p | |
http://bbcmedia.ic.llnwd.net:80/stream/bbcmedia_radio5live_mf_p | |
http://bbcmedia.ic.llnwd.net:80/stream/bbcmedia_6music_mf_p |