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
| // quite untested, adapted from BigstickCarpet's gist, attempt to make it simpler to use | |
| function openIndexedDB (fileindex) { | |
| // This works on all devices/browsers, and uses IndexedDBShim as a final fallback | |
| var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB; | |
| var openDB = indexedDB.open("MyDatabase", 1); | |
| openDB.onupgradeneeded = function() { | |
| var db = {} |
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 fs = require('fs'); | |
| var Promise = require('promise'); | |
| var promises = []; | |
| var readline = require('readline'); | |
| var readFile = function (file) { | |
| return new Promise(function (resolve, reject) { | |
| var lines = []; | |
| var rl = readline.createInterface({ | |
| input: fs.createReadStream('./logs/' + file) |
This is a simple guide to get you started with using the Ethereum Javascript API (web3.js) with the Create React Native App project. This is not an in-depth guide.
If you are lazy and just want to get started, I have this project ready for you. It should work out-of-the-box.
- Make sure you have Node version 6 or later installed, if not, get it on the Node website
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 waitFor = (ms) => new Promise(r => setTimeout(r, ms)) | |
| const asyncForEach = (array, callback) => { | |
| for (let index = 0; index < array.length; index++) { | |
| await callback(array[index], index, array) | |
| } | |
| } | |
| const start = async () => { | |
| await asyncForEach([1, 2, 3], async (num) => { | |
| await waitFor(50) |
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 a = ["sdfdf", "http://oooooolol"], | |
| handleNetErr = function(e) { return e }; | |
| Promise.all(fetch('sdfdsf').catch(handleNetErr), fetch('http://invalidurl').catch(handleNetErr)) | |
| .then(function(sdf, invalid) { | |
| console.log(sdf, invalid) // [Response, TypeError] | |
| }) | |
| .catch(function(err) { | |
| console.log(err); | |
| }) |
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
| Giới thiệu thần chú Đại Bi và nghi thức ngắn gọn để tụng trì | |
| ***************************** | |
| Theo kinh Thiên Thủ Thiên Nhãn Quán Thế Âm Bồ Tát Quảng Đại Viên Mãn Vô Ngại Đại Bi Tâm Đà La Ni, do ngài Già Phạm Đạt Ma dịch (thời Đường), toàn bài chú này có 84 câu, người trì tụng thần chú Đại Bi sẽ được 15 điều lành, không bị 15 thứ hoạnh tử bức hại. | |
| Được 15 điều lành: 1. Sinh ra thường được gặp vua hiền, 2. Thường sinh vào nước an ổn, 3. Thường gặp vận may, 4. Thường gặp được bạn tốt, 5. Sáu căn đầy đủ, 6. Tâm đạo thuần thục, 7. Không phạm giới cấm, 8. Bà con hòa thuận thương yêu, 9. Của cải thức ăn thường được sung túc, 10. Thường được người khác cung kính, giúp đỡ, 11. Có của báu không bị cướp đoạt, 12. Cầu gì đều được toại ý, 13. Long, Thiên, thiện thần thường theo hộ vệ, 14. Được gặp Phật nghe pháp, 15. Nghe Chánh pháp ngộ được nghĩa thâm sâu. | |
| Không bị 15 thứ hoạnh tử: 1. Chết vì đói khát khốn khổ, 2. Chết vì bị gông cùm, giam cầm đánh đập, 3. Chết vì oan gia báo thù, 4. Chết vì chiến trận, 5. Chết vì bị ác |
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 AWS = require('aws-sdk'); | |
| AWS.config.update({ | |
| accessKeyId: '{AWS_KEY}', | |
| secretAccessKey: '{AWS_SECRET}', | |
| region: '{SNS_REGION}' | |
| }); | |
| var sns = new AWS.SNS(); |
/*
Made by [egy.js](https://www.instagram.com/egy.js/);
*/

