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 f() { | |
async function sleep(mills) { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
return resolve() | |
}, mills) | |
}) | |
} | |
async function getPerformanceData() { | |
const maxTry = 10; |
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
using System; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Sockets; | |
namespace DnsCall | |
{ | |
class Program | |
{ |
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
furyform.com, www.furyform.com { | |
tls varavut@vable.me | |
proxy / furyform.com:3000 { | |
transparent | |
} | |
} | |
2bedev.com, www.2bedev.com { | |
tls varavut@vable.me | |
proxy / 2bedev.com:2368 { |
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
version: "2" | |
services: | |
caddy: | |
image: abiosoft/caddy:latest | |
container_name: caddy | |
ports: | |
- "80:80" | |
- "443:443" |
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
.... | |
furyform.com: | |
image: furyform:latest | |
build: ../furyform.com | |
container_name: furyform.com | |
environment: | |
- "NODE_ENV=production" |
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
version: "2" | |
services: | |
caddy: | |
image: abiosoft/caddy:latest | |
container_name: caddy | |
ports: | |
- "80:80" | |
- "443:443" |
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
Meteor.methods({ | |
'Threads.delete': function (threadId) { | |
if (!this.userId) | |
throw new Meteor.Error('Unauthorized', 'Please login before perform an action'); | |
check(threadId, String); | |
Threads.remove({ | |
_id: threadId, | |
owner: this.userId, | |
}); | |
return { message: 'Threads.delete OK' }; |
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
Meteor.methods({ | |
'Threads.create': function (title) { | |
if (!this.userId) | |
throw new Meteor.Error('Unauthorized', 'Please login before perform an action'); | |
check(title, String); | |
Threads.insert({ | |
title: title, | |
owner: this.userId, | |
createdAt: new Date(), | |
updatedAt: new Date() |
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
if (Meteor.isServer) { | |
Threads.allow({ | |
remove: function (userId, doc) { | |
if(!userId) | |
throw new Meteor.Error('Unauthorized', 'Please login before perform an action'); | |
return result = doc.owner === userId; | |
} | |
}); | |
} |
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
if (Meteor.isServer) { | |
Threads.allow({ | |
insert: function (userId, doc) { | |
if(!userId) | |
throw new Meteor.Error('Unauthorized', 'Please login before perform an action'); | |
check(doc.title, String); | |
if (doc.owner && doc.owner != userId) | |
throw new Meteor.Error('No permission', 'Can\'t create a thread in the name of other'); | |
doc.owner = userId; | |
doc.createdAt = new Date(); |
NewerOlder