Skip to content

Instantly share code, notes, and snippets.

Working remote and staying safe

Jason N. Gaylord jasongaylord

Working remote and staying safe
View GitHub Profile
jasongaylord / pr-webhook-schema.json
Created Sep 23, 2020
GitHub WebHook API Pull Request Schema
View pr-webhook-schema.json
"type": "object",
"properties": {
"action": {
"type": "string"
"number": {
"type": "integer"
"pull_request": {
jasongaylord / beacon.html
Created Aug 27, 2020
Beacon CSS - An example using CSS animations to create a beacon for use on something like a map or to call attention visually.
View beacon.html
<html lang="en">
.dot {
background-color: red;
border-radius: 50%;
width: 20px;
height: 20px;
display: block;
jasongaylord / New-CName.ps1
Created Apr 29, 2019
A script to create a new CName on an existing zone in Azure. You can use this script in an Azure DevOps pipeline using a service account with the proper permissions.
View New-CName.ps1
# Subscription ID
[Parameter(Position=0, Mandatory=$true)]
# DNS Resource Group Name
[Parameter(Position=1, Mandatory=$true)]
jasongaylord / azure-pipelines.yml
Created Apr 11, 2019
Azure Pipelines - Build YAML file for HTML Copying
View azure-pipelines.yml
- master
name: $(Date:yyyyMMdd)$(Rev:.r)
vmImage: 'Ubuntu-16.04'
- task: CopyFiles@2
jasongaylord / youtube.cs
Created Feb 20, 2019
YouTube API Connection
View youtube.cs
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");
jasongaylord / droptables.sql
Created Nov 12, 2018
Drop All Cloudscribe Tables
View droptables.sql
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;
View TwitterService.cs
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("");
request.Headers.Add("Authorization", "Basic " + applicationAuthorization);
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded;charset=UTF-8";
View ITwitterService.cs
public interface ITwitterService
string ObtainBearerToken(string consumerKey, string consumerSecret);
Task<List<Tweet>> RetrieveTweetsAsync(TwitterOptions options);
View Tweet.cs
public class Tweet
public string Username { get; set; }
public string Message { get; set; }
public string Avatar { get; set; }
public string Timestamp { get; set; }
public string Id { get; set; }
View TweetRaw.cs
public class TweetRaw
public string id_str { get; set; }
public string text { get; set; }
public string created_at { get; set; }
public string in_reply_to_screen_name { get; set; }
public UserRaw user { get; set; }
public class UserRaw