This file contains hidden or 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
For Fiddler to monitor, the minimal you need to do is your client needs to communicate with | |
http://machine-name:port/TestService.svc | |
NOT localhost:port NOT 127.0.0.1:port | |
--- | |
Your WCF-service is running on IIS Express, thru Visual Studio; | |
See (WCF-)Project / Properties / Web / Servers:IIS Express | |
Project Url: http://localhost:50122/TestService.svc |
This file contains hidden or 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
Convert XmlElement to XElement | |
--- | |
Private Function ConvertToXmlElement(ByVal elem As XElement) _ | |
As XmlElement | |
Dim xmldoc As New XmlDocument() | |
xmldoc.Load(elem.CreateReader()) | |
Return xmldoc.DocumentElement | |
End Function | |
This file contains hidden or 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
ffmpeg -f lavfi -i 'testsrc2=size=1280x720:rate=60,format=yuv420p' \ | |
-f lavfi -i 'sine=frequency=440:sample_rate=48000:beep_factor=4' \ | |
-c:v libx264 -preset ultrafast -tune zerolatency -profile:v high \ | |
-b:v 1400k -bufsize 2800k -x264opts keyint=120:min-keyint=120:scenecut=-1 \ | |
-c:a aac -b:a 32k -f flv rtmp://transcoder/encoder/colorbar |
This file contains hidden or 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
module.exports.COLORS_MAP = { | |
"AliceBlue": "#F0F8FF", | |
"AntiqueWhite": "#FAEBD7", | |
"Aqua": "#00FFFF", | |
"Aquamarine": "#7FFFD4", | |
"Azure": "#F0FFFF", | |
"Beige": "#F5F5DC", | |
"Bisque": "#FFE4C4", | |
"Black": "#000000", | |
"BlanchedAlmond": "#FFEBCD", |
This file contains hidden or 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>My Title</title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="shortcut icon" href="/favicon.ico" /> | |
<link rel="apple-touch-icon" href="/icon.png" /> |
This file contains hidden or 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
-- T-SQL, XQuery, XML stuff quick ref | |
declare @xml xml = N' | |
<root> | |
<node roll="1" fname="sid">Luke Skywalker</node> | |
<node roll="2" fname="neel">Anakin Skywalker?<node> | |
</root>' | |
-- prints the roll number of the first node | |
select @xml.value('(/root/node/@roll)[1]', 'INT') |
This file contains hidden or 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
// Create new Date instance (or use another date, but a JS date object) | |
var date = new Date(); | |
// add a day | |
date.setDate(date.getDate() + 1); | |
//REF: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date |
This file contains hidden or 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
Find the time as seen in the video player | |
(1) To link to another video | |
Right click: Copy video url at current time | |
OR | |
(2) To link to same video (in a comment for the same video): | |
just enter the timestamp, in the format Hours:Minutes:Seconds (i.e. no spaces) |
This file contains hidden or 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 isWeekend(thisDate) { | |
let tf = Object.prototype.toString.call(thisDate) === '[object Date]' | |
if (tf) | |
throw new Exception("input parameter is not a Date) | |
//.getDay() returns a integer between 0 and 6 (0 being Sunday, 6 being Saturday). | |
if( thisDate.getDay() == 6 || thisDate.getDay() == 0 ) | |
return true; | |
else | |
return false; |
This file contains hidden or 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: >node makeHttpReq.js | |
=========================== */ | |
const INTERVAL_MINS = 15; | |
const http = require('http'); //define the native (to node) http module, where you can make a request; | |
const url = "http://YOUR/SERVER/HERE/Path/To/Your/Route.aspx"; | |
callbackFN(); //MAKE ONE CALL, then set up periodic calls... | |
let requestLoop = setInterval( callbackFN, INTERVAL_MINS*60*1000); |