Skip to content

Instantly share code, notes, and snippets.

Andrew Connell andrewconnell

View GitHub Profile
@andrewconnell
andrewconnell / live-site-annotate.yml
Last active May 27, 2020
(post): Automated Hugo Releases With Github Actions
View live-site-annotate.yml
######################################################################
# add release annotation to Azure App Insights
# > only annotate on push events & non [content] commits
######################################################################
- name: Annotate deployment to Azure Application Insights
uses: wictorwilen/application-insights-action@v1
if: "github.event_name=='push' && !contains(github.event.head_commit.message,'[content]')"
with:
applicationId: ${{ env.AZURE_APPLICATION_INSIGHTS_APPID }}
apiKey: ${{ secrets.AZURE_APPLICATION_INSIGHTS_APIKEY }}
View partial.sidebar.html
{{ $s := newScratch }}
{{/* ARCHIVE */}}
{{ $s.Set "archive" slice }}
{{ $s.Set "years" slice }}
{{ range sort (index .Site.Taxonomies "blog/archive") "Page.Title" "desc" }}
{{ $splitted_date := split .Page.Title "/" }}
{{ $year := index $splitted_date 0 }}
{{ $month := index $splitted_date 1 }}
View blog-post.md
---
...
changelog:
  - timestamp: 2007-05-24T18:43:03-04:00
    description: 'This event has been cancelled because the speaker (me) is not available due to illness. We''ve rescheduled the session for our June meeting. See the [JOG website](http://www.jacksonvilleofficegeeks.net) for more information.'
---
View test.md

https://example.com

https://example.com

Required Endpoint Why
https://*.blob.core.usgovcloudapi.net Migration API Azure Government requirement
https://*.queue.core.usgovcloudapi.net Migration API Azure Government requirement
https://*.queue.core.usgovcloudapi.net Migration API Azure Government requirement
@andrewconnell
andrewconnell / default-spfx-v110-webpart.ts
Last active Apr 18, 2020
Blog post: "Fixing the default SharePoint Framework web part code in SPFx v1.10"
View default-spfx-v110-webpart.ts
// omitted for brevity...
export default class HelloWorldWebPart extends BaseClientSideWebPart <IHelloWorldWebPartProps> {
public render(): void {
this.domElement.innerHTML = `
<div class="${ styles.helloWorld }">
<div class="${ styles.container }">
<div class="${ styles.row }">
<div class="${ styles.column }">
<span class="${ styles.title }">Welcome to SharePoint!</span>
@andrewconnell
andrewconnell / azure-pipelines.yml
Created Feb 11, 2020
(blog) Update to my Azure Pipelines Templates for SPFx Projects (v1.3.0)
View azure-pipelines.yml
# azure-pipelines.yml
resources:
repositories:
- repository: azure-pipelines-spfx-templates
type: github
name: voitanos/azure-pipelines-spfx-templates
ref: refs/tags/v1.0.3
endpoint: github
@andrewconnell
andrewconnell / activity.json
Created Dec 25, 2019
Copying files based on file content between two locations with Azure Data Factory
View activity.json
"activities": [
{
"name": "RawMetadata",
"type": "GetMetadata",
"dependsOn": [],
"policy": {
"timeout": "7.00:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
View azure-pipelines.yml
trigger:
branches:
include:
- '*'
variables:
- group: office365credentials
stages:
- stage: Build
@andrewconnell
andrewconnell / azure-pipelines.yml
Last active Oct 19, 2019
Add Search to Hugo Sites with Azure Search
View azure-pipelines.yml
- stage: live_site_post_deploy
displayName: Live site post deployment
dependsOn:
- live_site_build_deploy
# always build on pushes to master
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
jobs:
- deployment: exec_search_reindex
displayName: Reindex Azure Search
pool:
View onClickHandler.tsx
export default class HelloWorld extends React.Component<IHelloWorldProps, {}> {
private foo: string = "some string";
public render(): React.ReactElement<IHelloWorldProps> {
return (
<button type="button" onClick={ this.onClickHandler }>
trigger problem
</button>
);
}
You can’t perform that action at this time.