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
const lnurl = require('lnurl') | |
const { v4: uuid4 } = require('uuid') | |
const express = require('express') | |
const { exec } = require('child_process') | |
const crypto = require('crypto') | |
const app = express() | |
const port = 7000 | |
const users = ['godwin', 'bernard'] |
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.5.0; | |
contract C1 { | |
uint public num; | |
address public sender; | |
function callSetNum(address c2, uint _num) public { | |
(bool res,) = c2.call(abi.encodePacked(bytes4(keccak256("setNum(uint256)")), _num)); | |
if(!res) revert(); // C2's num is set | |
} |
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
Developing apps with angularjs comes with it's own headaches, one of which is the caching of files in the browser. | |
As a developer you can make use of plugins like Classic Cache Killer or disable caching in devtools. You can't go around asking all | |
your users to clear their cache after every new update | |
After going through several SO posts and blogs, only one solution worked for me(based on my setup). | |
Using Nginx, I added this directive | |
location ~* \.(?:manifest|appcache|html?|xml|json)$ { | |
expires -1; | |
} |
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
{url:'stun:stun01.sipphone.com'}, | |
{url:'stun:stun.ekiga.net'}, | |
{url:'stun:stun.fwdnet.net'}, | |
{url:'stun:stun.ideasip.com'}, | |
{url:'stun:stun.iptel.org'}, | |
{url:'stun:stun.rixtelecom.se'}, | |
{url:'stun:stun.schlund.de'}, | |
{url:'stun:stun.l.google.com:19302'}, | |
{url:'stun:stun1.l.google.com:19302'}, | |
{url:'stun:stun2.l.google.com:19302'}, |
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
""" | |
The activation key for the ``UserProfile`` will be a | |
SHA1 hash, generated from a combination of the ``User``'s | |
email and a random salt. | |
""" | |
salt = hashlib.sha1(str(random.random())).hexdigest()[:5] | |
email = user.email | |
if isinstance(email, unicode): |