Skip to content

Instantly share code, notes, and snippets.

View LindaLawton's full-sized avatar
🎯
Focusing

Linda Lawton LindaLawton

🎯
Focusing
View GitHub Profile
@LindaLawton
LindaLawton / KlFhirIssueOneReport.json
Last active March 10, 2022 08:00
Report processing error.
{
"resourceType": "Bundle",
"id": "2d3be3fe-f464-4bb1-b0eb-110c2a88e8a9",
"meta": {
"profile": [
"http://gateway.kl.dk/1.0/StructureDefinition/klgateway-care-delivery-report"
]
},
"type": "collection",
"timestamp": "2022-03-03T12:07:20.91+01:00",
{
"resourceType": "Bundle",
"id": "C424B46A-C0D9-4836-A835-57CF83A41358",
"meta": {
"profile": [
"http://gateway.kl.dk/1.0/StructureDefinition/klgateway-care-delivery-report"
]
},
"type": "collection",
"timestamp": "2021-07-15T12:40:16.657+02:00",
@LindaLawton
LindaLawton / Wix Toolset Upgrade
Created July 6, 2016 13:24
How to allow upgrade with Wix.
<?xml version="1.0" encoding="UTF-8"?>
<?define ProductVersion="!(bind.FileVersion.MyAssemblyDll)"?>
<?define UpgradeCode="f4d7f199-28f6-45d5-ad99-7c62938274be"?>
<?define ProductId="{6408D956-40DA-4AEE-883E-5425F1562004}"?>
<?define Version="1.0.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="UpgradeTest" Language="1033" Version="$(var.Version)" Manufacturer="xxx" UpgradeCode="$(var.UpgradeCode)">
<Package Id="*" InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
@LindaLawton
LindaLawton / GmailSendMail.psi
Last active December 6, 2021 05:18
Step by step guild to using power shell to get a Google access token.
clear-host;
#Remove-Variable * -ErrorAction SilentlyContinue
#get-item Variable:*
#Get-Variable | Select-Object -ExpandProperty Name
. C:\Users\linda_l\Desktop\PowerShell\GoogleOauth.ps1
Add-Type -Path "C:\Users\linda_l\Documents\visual studio 2015\Projects\TestingLibrary\packages\AE.Net.Mail.1.7.10.0\lib\net45\AE.Net.Mail.dll"
Add-Type -AssemblyName System.IO
Add-Type -AssemblyName System.Text.Encoding
@LindaLawton
LindaLawton / UploadVideo.cs
Created November 18, 2021 16:04
Upload a file to YouTube. Console application.
using System;
using System.IO;
using System.Threading.Tasks;
using Google.Apis.Upload;
using Google.Apis.YouTube.v3;
using Google.Apis.YouTube.v3.Data;
namespace YouTubeExampleUpload
{
public class UploadVideo
@LindaLawton
LindaLawton / DeployGCP-K8sCluster.txt
Last active October 4, 2021 10:05
GCP Deploy Kuberneties cluser using gcloud deployment-manager
#create the new cluser
gcloud deployment-manager deployments create kuberneties-deployment-v3 --config k8s.yaml
# update the cluser if you change the yaml file
gcloud deployment-manager deployments update kuberneties-deployment-v3 --config k8s.yaml
@LindaLawton
LindaLawton / LogarithmicPeakFinding.cs
Created March 23, 2017 11:38
logarithmic peak finding solution in C#
using System;
namespace CsharpCodeExamples
{
class Program
{
//Peak Finding in C# O(Log N)
//If we take a look at a set of numbers: { 1, 3, 4, 3, 2, 1, 3, 6 }
@LindaLawton
LindaLawton / index.html
Last active March 19, 2021 09:45
Three JavaScript example for connecting to Google Drive api.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hello Drive v3</title>
<!-- Create a client id on Google developer console. Web credentials https://youtu.be/pBVAyU4pZOU -->
<meta name="google-signin-client_id" content="YOURCREDENTIALSHERE">
<meta name="google-signin-scope" content="https://www.googleapis.com/auth/drive.metadata.readonly">
</head>
<body>
@LindaLawton
LindaLawton / GoogleDriveAuthentcation.cs
Created February 21, 2017 12:01
How to remove a file from the share with me folder on Google drive using the Google drive api V3 and C#
using Google.Apis.Auth.OAuth2;
using Google.Apis.Drive.v3;
using Google.Apis.Services;
using Google.Apis.Util.Store;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
internal class GoogleDriveAuthentcation
@LindaLawton
LindaLawton / GoogleAnalyticsReportingSample.java
Created June 15, 2017 09:38
Sample for the Google Analytics reporting API with java
import com.google.api.client.extensions.java6.auth.oauth2.AuthorizationCodeInstalledApp;
import com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver;
import com.google.api.client.auth.oauth2.Credential;
import com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeFlow;
import com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets;
import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.json.JsonFactory;
import com.google.api.client.json.jackson2.JacksonFactory;
import com.google.api.client.util.store.DataStoreFactory;