Skip to content

Instantly share code, notes, and snippets.

Avatar
😎
Coding

Georg Dangl GeorgDangl

😎
Coding
View GitHub Profile
@GeorgDangl
GeorgDangl / index.html
Created Oct 19, 2021
#31474 Electron crash when launched from network drive
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
We are using Node.js <span id="node-version"></span>,
View BuildElectron.cs
Target BuildElectronApp => _ => _
.DependsOn(Clean)
.DependsOn(GenerateVersion)
.Requires(() => CodeSigningCertificateName != null)
.Executes(() =>
{
// To ensure the tool is always up to date
DotNet("tool update ElectronNET.CLI -g");
BuildElectronAppInternal(
View Dockerfile
FROM node:14 AS node
FROM node AS headless
RUN apt-get update && \
apt-get install -y xvfb \
libgbm1 \
libxss1 \
libnss3 \
libgtk-3-dev \
libasound2-dev \
View DockerWebhook.cs
private async Task CallWebhookToUpdateDockerImageAsync()
{
var webhookUri = "https://username:password@app-name.scm.azurewebsites.net/docker/hook";
var uri = new Uri(webhookUri);
var httpRequest = new HttpRequestMessage(HttpMethod.Post, webhookUri);
// The webhooks for Azure App Service contain username & password, it's required for authentication
// in the webhook request
if (!string.IsNullOrWhiteSpace(uri.UserInfo))
{
var encodedStr = Convert.ToBase64String(Encoding.ASCII.GetBytes(uri.UserInfo));
View Build.cs
using Nuke.Common;
using Nuke.Common.Execution;
using Nuke.Common.Tools.GitVersion;
using static Nuke.Common.IO.FileSystemTasks;
using static Nuke.Common.Tools.Npm.NpmTasks;
using static Nuke.Common.ChangeLog.ChangelogTasks;
using static Nuke.Common.IO.TextTasks;
using static Nuke.GitHub.GitHubTasks;
using Nuke.GitHub;
using Nuke.Common.Git;
View AssemblyInfo.cs
using Xunit;
// This is required to have the IAssemblyFixture from the Xunit.Extensions.Ordering Package available
[assembly: TestFramework("Xunit.Extensions.Ordering.TestFramework", "Xunit.Extensions.Ordering")]
View Jenkinsfile
pipeline {
triggers {
cron('0 0 1 * *')
}
agent {
node {
label 'master'
customWorkspace 'workspace/JenkinsBackup'
}
}
View E2eTestsBase.cs
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Remote;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Threading.Tasks;
using Xunit;
View first_approach.cs
_requestUrl
.Subscribe(async url =>
{
var response = await httpClient.GetAsync(url);
// Update the list
});
View RevitApi_Correct.cs
var callbackStack = new Stack<Action>();
uiapp.Idling += (s, e) =>
{
if (callbackStack.Any())
{
var action = callbackStack.Pop();
action.Invoke();
}
};