Midnightride partner

The Real Story of Revere’s Ride. In 1774 and the spring of 1775 Paul Revere was employed by the Boston Committee of Correspondence and the Massachusetts Committee of Safety as an express rider to carry news, messages, and copies of important documents as far away as New York and Philadelphia. Midnight Ride by Mick Mclane, released 08 January 2020 1. Midnight Show 2. The Great Decade 3. Power Play 4. Allegiance 5. Small Venue 6. Retro Future 7. Quick Setup 8. We Ride At Dawn 9. Rock Dust John delivery a car from Chicago to San Diego, but on the road makes a fatal mistake of his journey, on a rainy night he picks up a fellow traveler, Mick MacLane, who turns out to be a maniac ... Poor William Dawes Jr. All guts, no glory. While every schoolchild knows of the midnight ride of Paul Revere, Dawes made an even more daring gallop out of Boston that same April night in 1775. The Midnight Ride of Paul Revere. Paul Revere’s Ride: The Patriots Prepare for Battle. On April 16th, 1775, Paul Revere began to gather tips that a raid was planned for the city of Concord in the coming days. In fact, it is speculated that these tips came from General Gage’s wife, an American who may have been sympathetic to the plight of ... Alan Tam - Midnight Rider (1986) Can you feel a rumbling, It's building like a thunder inside you. Feel the earth is quaking, The air itself is shaking around you. Shadows on the moon, Someone's coming, Very soon you will meet him, The midnight rider comes for you. Now is the time, you know it's right, It is your destiny, And there'll be no more turning back, So take your place is history. Day 3: Midnight Ride Disclaimer: I have tried to recreate the events, locales, and conversations from my memories of them. The below-expressed views, opinions or analogies are personal and may not be in line with the widespread conceptions.

[JS] My simple, uber-secure chat program built on WebRTC+PGP

2014.09.27 21:07 dontworryimnotacop [JS] My simple, uber-secure chat program built on WebRTC+PGP

This is a small library I wrote to simplify setting up a chat between two people using WebRTC connections.
WebRTC is a relatively new standard (still doesn't work in Safari/IE atm), but it basically allows P2P connections directly between browsers (with no servers at all). You can self host this script, and use it in your browser with a friend on the other side of the world, and your communication will go directly between the two of you, double-encrypted with RTC's mandatory TLS and OpenPGP.
You can test it/see it in action here: http://github.midnightriding.com/WebRTCChat/ (open this link in two separate tabs or computers to chat between them) Prettier code (+HTML interface) is here: https://github.com/pirate/WebRTCChat
I would love any feedback on JS style, best practices, feature enhancements, anything. :) (also for this project I'm deliberately avoiding using prototypes for simplicity).
function WebRTCChat(cfg, con, myKeyPair, usePGP, theyUsePGP, sendTyping) { var self = this; /* WebRTC setup for broser-to-browser connection */ self.cfg = {'iceServers':[]}; //{"url":"stun:"} self.con = {'optional': [{'DtlsSrtpKeyAgreement': true}] }; self.activeChannel; self.activeConnection; self.roomName; /* OpenPGP setup for chat encryption */ self.myKeyPair = null; self.theirPubKey = ""; self.readystate = false; self.usePGP = true; self.theyUsePGP = true; self.pgpStrength = 512; self.sendTyping = true; self.PGPdecrypt = function(message) { pgpMessage = openpgp.message.readArmored(message); return openpgp.decryptMessage(self.myKeyPair.key, pgpMessage); } self.PGPencrypt = function(message) { return openpgp.encryptMessage(self.theirPubKey.keys, message); } /* WebRTC + PGP CHAT CONNECTION CODE */ /* THE HOST (initiates the chat) */ self.hostChat = function(offer_callback, ready_callback) { var hostConnection = new RTCPeerConnection(self.cfg, self.con); // init connection self.initConnection(hostConnection, offer_callback); var hostChannel = hostConnection.createDataChannel('test', {reliable:true, ordered:true}); // init channel self.initChannel(hostChannel, ready_callback); console.log("Creating RTC Chat Host Offer..."); hostConnection.createOffer(self.handleDescription, self.handleDescriptionFailure); // copy paste this offer to all clients who want to join // they paste their answer back, which goes into handleAnswerFromClient } self.handleAnswerFromClient = function(answer) { if (answer.pgpKey) { self.theirPubKey = openpgp.key.readArmored(answer.pgpKey); console.log("Received Chat Partner's Public PGP Key: ", answer.pgpKey); } self.theyUsePGP = Boolean(answer.encryption); var answerDesc = new RTCSessionDescription(answer.rtc); console.log("Received Chat RTC Join Answer: ", answerDesc); self.activeConnection.setRemoteDescription(answerDesc); writeToChatLog("Started hosting a chat.", "text-success alert-success"); // hostChannel.onopen will trigger once the connection is complete (enabling the chat window) } /* THE JOINEE (joins an existing chat) */ self.joinChat = function(offer, answer_callback, ready_callback) { var clientConnection = new RTCPeerConnection(cfg, con); self.initConnection(clientConnection, answer_callback); clientConnection.ondatachannel = function (e) { // once client receives a good data channel from the host // Chrome sends event, FF sends raw channel var clientChannel = e.channel e; self.initChannel(clientChannel, ready_callback); writeToChatLog("Joined a chat.", "text-success alert-success"); // clientChannel.onopen will then trigger once the connection is complete (enabling the chat window) }; if (offer.pgpKey) { self.theirPubKey = openpgp.key.readArmored(offer.pgpKey); console.log("Received Chat Partner's Public PGP Key: ", offer.pgpKey); } self.theyUsePGP = Boolean(offer.encryption); self.roomName = offer.roomName; var offerDesc = new RTCSessionDescription(offer.rtc); console.log("Received Chat RTC Host Offer: ", offerDesc); self.activeConnection.setRemoteDescription(offerDesc); console.log("Answering Chat Host Offer..."); self.activeConnection.createAnswer(self.handleDescription, self.handleDescriptionFailure); // ondatachannel triggers once the client has accepted our answer ^ } self.initConnection = function(conn, callback) { self.activeConnection = conn; self.myKeyPair = openpgp.generateKeyPair({numBits:self.pgpStrength,userId:"1",passphrase:"",unlocked:true}); // these aren't really necessary conn.onconnection = function (state) {console.info('Chat connection complete: ', event);} conn.onsignalingstatechange = function (state) {console.info('Signaling state change: ', state); if (self.activeConnection.iceConnectionState == "disconnected") self.writeToChatLog("Chat partner disconnected.", "text-warning alert-error");} conn.oniceconnectionstatechange = function (state) {console.info('Signaling ICE connection state change: ', state); if (self.activeConnection.iceConnectionState == "disconnected") self.writeToChatLog("Chat partner disconnected.", "text-warning alert-error");} conn.onicegatheringstatechange = function (state) {console.info('Signaling ICE setup state change: ', state);} //this is the important one conn.onicecandidate = function (event) { // when browser has determined how to form a connection, generate offer or answer with ICE connection details and PGP public key if (event.candidate == null) { console.log("Valid ICE connection candidate determined."); var offer_or_answer = JSON.stringify({ rtc: self.activeConnection.localDescription, pgpKey: self.myKeyPair.publicKeyArmored, encryption: self.usePGP, roomName: self.roomName }); // pass the offer or answer to the callback for display to the user or to send over some other communication channel if (callback) callback(offer_or_answer); } }; conn.onfailure = function(details) {callback(details)}; console.log("Initialized Connection: ", conn); } self.initChannel = function(chan, callback) { self.activeChannel = chan; // once the channel is open, trigger the callback to enable the chat window or carry out other logic chan.onopen = function (e) { console.log('Data Channel Connected.'); self.readystate = true; if (callback) callback(e);} chan.onmessage = self.receiveMessage; console.log("Initialized Data Channel: ", chan); } self.handleDescription = function(desc) { self.activeConnection.setLocalDescription(desc, function () {}); } self.handleDescriptionFailure = function() { console.warn("Failed to create or answer chat offer."); self.activeConnection.onfailure("Invalid or expired chat offer. Please try again.") } // messaging functions self.sendTypingMessage = function() { self.activeChannel.send(JSON.stringify({message:null,typing:true,encrypted:false})); } self.sendMessage = function(message, encrypted) { if (Boolean(encrypted)) { self.activeChannel.send(JSON.stringify({message: self.PGPencrypt(message), encrypted:true})); self.writeToChatLog(message, "text-success sent secure", true); } else { self.activeChannel.send(JSON.stringify({message: message, encrypted:false})); self.writeToChatLog(message, "text-success sent insecure", false); } } self.receiveMessage = function(event) { var data = JSON.parse(event.data); if (data.type === 'file' event.data.size) console.log("Receiving a file."); else { if (data.typing && !data.message) { console.log("Partner is typing..."); self.displayPartnerTyping(); } else { console.log("Received a message: ", data.message); if (data.encrypted) self.writeToChatLog(self.PGPdecrypt(data.message), "text-info recv", true); else self.writeToChatLog(data.message, "text-info recv", false); } } } /* Utilities */ // set these to your own functions using WebRTCChat.writeToChatLog = function(...) {...} self.writeToChatLog = function(message, message_type, secure) {console.log("-> ", message, message_type, secure);} self.displayPartnerTyping = function() {console.log("-> Typing...");} } 
submitted by dontworryimnotacop to CritiqueMyCode [link] [comments]

Ultraleap hand tracking in 'The Twilight Saga: Midnight Ride' experience GHWB FUNERAL - THE ENVELOPE AFFAIR - YouTube Midnight Ride of Paul Revere - YouTube Liberty's Kids HD 105 Promo - The Midnight Ride  History Cartoons for Children Liberty's Kids 105 - The Midnight Ride - YouTube Midnight Rider - YouTube Ron Howard Has Revealed Some Sad News - YouTube

Day 3: Midnight Ride – Pattern$ oF [email protected]

  1. Ultraleap hand tracking in 'The Twilight Saga: Midnight Ride' experience
  3. Midnight Ride of Paul Revere - YouTube
  4. Liberty's Kids HD 105 Promo - The Midnight Ride History Cartoons for Children
  5. Liberty's Kids 105 - The Midnight Ride - YouTube
  6. Midnight Rider - YouTube
  7. Ron Howard Has Revealed Some Sad News - YouTube

web: http://watchjojo.com SUBSCRIBE US: https://goo.gl/Z4nZcg Follow Us On Google Plus: https://goo.gl/JYf9Rr Like us Our Facebook Page: https://goo.g... Liberty's Kids HD 105 Promo - The Midnight Ride History Cartoons for Children Liberty's Kids - WildBrain. Loading... Unsubscribe from Liberty's Kids - WildBrain? Hi guys! We have a new channel with puppets and music and humor. Please subscribe for more educational content at, Start With Heart Videos. Thanks! https://w... The nuances of the GHWB Funeral - the Main Players - Early Cordiality - or Not - and the Receipt by 5 Couples of a Specially Served Envelope: [email protected] Paul Revere and William Dawes spread the word that the 'British are coming!' on the eve of 'the shot heard 'round the world.' Sarah and James travel to Bosto... Provided to YouTube by Sony Music Entertainment Midnight Rider · Waylon Jennings The Ramblin' Man ℗ 1974 Sony Music Entertainment Released on: 1974-09-01 Com... DreamCraft Attractions and Cavu DesignWerks launched 'The Twilight Saga: Midnight Ride' this year at Lionsgate Entertainment World - one of China's leading theme parks - and it features hand ...