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
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Testing IE Compatibility Mode</title> | |
<script src="ieUserAgent.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<div id="results">Results:</div> | |
<script type="text/javascript"> | |
var val = "IE" + ieUserAgent.version; |
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
<html> | |
<head> | |
<title>Test Caps Lock</title> | |
</head> | |
<body> | |
<div id="capsLockWarning" style="font-weight: bold; color: maroon; margin: 0 0 10px 0; display: none;">Caps Lock is on.</div> | |
Username: <input type="text" id="username" /><br/> | |
Password: <input type="password" id="password" /> | |
</body> | |
<script language="javascript"> |
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
{ | |
"type": "object", | |
"properties": { | |
"action": { | |
"type": "string" | |
}, | |
"number": { | |
"type": "integer" | |
}, | |
"pull_request": { |
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
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<style> | |
.dot { | |
background-color: red; | |
border-radius: 50%; | |
width: 20px; | |
height: 20px; | |
display: block; |
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
param( | |
[CmdletBinding()] | |
# Subscription ID | |
[Parameter(Position=0, Mandatory=$true)] | |
[string]$subId, | |
# DNS Resource Group Name | |
[Parameter(Position=1, Mandatory=$true)] | |
[string]$resourceGroup, |
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
trigger: | |
- master | |
name: $(Date:yyyyMMdd)$(Rev:.r) | |
pool: | |
vmImage: 'Ubuntu-16.04' | |
steps: | |
- task: CopyFiles@2 |
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
public List<Google.Apis.YouTube.v3.Data.SearchResult> LatestVideos() | |
{ | |
var youTubeService = new YouTubeService( | |
new BaseClientService.Initializer() { | |
ApplicationName = "{Project}", | |
ApiKey = "{API_key}" | |
} | |
); | |
var listRequest = youTubeService.Search.List("snippet"); |
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
public static class DateTimeExtensions | |
{ | |
public static string ToFriendlyDate(this DateTime date) | |
{ | |
// Calculate the elapsed time | |
TimeSpan s = DateTime.UtcNow.Subtract(date); | |
// Get total number of days elapsed. | |
int dayDiff = (int)s.TotalDays; |
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
drop table dbo.cs_UserToken; | |
drop table dbo.cs_UserRole; | |
drop table dbo.cs_UserLogin; | |
drop table dbo.cs_UserLocation; | |
drop table dbo.cs_UserClaim; | |
drop table dbo.cs_User; | |
drop table dbo.cs_SystemLog; | |
drop table dbo.cs_SiteHost; | |
drop table dbo.cs_Site; | |
drop table dbo.cs_Role; |
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
public class TwitterService : ITwitterService | |
{ | |
public string ObtainBearerToken(string consumerKey, string consumerSecret) | |
{ | |
var applicationAuthorization = Convert.ToBase64String(Encoding.UTF8.GetBytes(string.Format("{0}:{1}", Uri.EscapeDataString(consumerKey), Uri.EscapeDataString(consumerSecret)))); | |
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://api.twitter.com/oauth2/token"); | |
request.Headers.Add("Authorization", "Basic " + applicationAuthorization); | |
request.Method = "POST"; | |
request.ContentType = "application/x-www-form-urlencoded;charset=UTF-8"; |
NewerOlder