This file contains 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
pragma solidity ^0.8.0; | |
contract DAOLaunchpad { | |
// the name of the launchpad | |
string public name; | |
// the address of the owner of the launchpad | |
address public owner; | |
// the mapping of members of the launchpad |
This file contains 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 authenticationMiddleware () { | |
return (req, res, next) => { | |
console.log(`req.session.passport.user: ${JSON.stringify(req.session.passport)}`); | |
if (req.isAuthenticated()) return next(); | |
res.redirect('/login') | |
} | |
} |
This file contains 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
// https://github.com/realm/realm-js/issues/370#issuecomment-270849466 | |
export default class Realm { | |
constructor(params) { | |
this.schema = {}; | |
this.callbackList = []; | |
this.data = {}; | |
this.schemaCallbackList = {}; | |
params.schema.forEach((schema) => { | |
this.data[schema.name] = {}; | |
}); |
This file contains 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
#!/usr/bin/env python | |
''' | |
Query on GoogleImageSearch and install resulted images by scraping. | |
To use this script install mechanize and BeautifulSoup packages as | |
easy_install mechanize | |
easy_install Beautiful |