- Open the Amazon Route 53 console at https://console.aws.amazon.com/route53/.
- If you are new to Amazon Route 53, you see a welcome page; choose Get Started Now for DNS Management. Otherwise, choose Hosted Zones in the navigation pane.
- Choose Create Hosted Zone.
- For Domain Name, type your domain name.
- Choose Create.
- Click the Hosted Zone, edit record set.
- In the value, add
ec2-54-152-134-146.compute-1.amazonaws.com.
- Change your DNS file to point to the IPv4 address (This would be in something like GoDaddy).
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(global){ | |
"use strict"; | |
function constEnumPropValueDesc(v){ | |
return { | |
value: v, | |
enumerable: true, | |
configurable: false, | |
writable: false | |
}; |
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
# usage ./yt.sh <https://youtube.com/watch?v=....> | |
urldecode() { | |
local url_encoded="${1//+/ }" | |
printf '%b' "${url_encoded//%/\\x}" | |
} | |
video_url="$1" | |
raw_url=$(curl \ | |
-H 'Upgrade-insecure-requests: 1' \ | |
-H 'Cache-control: max-age=0' \ | |
-H 'Accept-language: en-US,en;q=0.8,bn;q=0.6' \ |
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
/* | |
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
server, but for some reason omit a client connecting to it. I added an | |
example at the bottom. | |
Save the following server in example.js: | |
*/ | |
var net = require('net'); |
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
let bcrypt = require('bcrypt-nodejs'); | |
let password = "hello"; | |
let stored_hash = ""; | |
// first generate a random salt | |
function genSalt(password) { | |
return new Promise((resolve,reject) => { | |
bcrypt.genSalt(10,function(err,salt) { | |
if (err) { |
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
var game; | |
function createGame() { | |
game = new MyGame.Game(); | |
game.state.onStateChange.add(function (state) { | |
if (state === 'menu') { | |
runTests(); // wait for boot + preload to complete before running tests | |
} | |
}, this); | |
game.play(); // init's game and sets the initial Phaser.State |
There's not telegram API method for this, we need to call MTProto methods to retrieve messages from the "Recent Actions" (Admin Log) since deleted messages (and medias) gets moved there for 48 hours before the permanent deletion.
from telethon import TelegramClient, events, sync
from telethon.tl.types import InputChannel, PeerChannel
from telethon.tl.types import Channel
import time