Skip to content

Instantly share code, notes, and snippets.

View Swimburger's full-sized avatar
🍔
Creating full snack content

Niels Swimberghe Swimburger

🍔
Creating full snack content
View GitHub Profile
@Swimburger
Swimburger / index.html
Last active September 28, 2021 22:29
Load Blazor Component from JavaScript
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>RenderBlazorFromJs</title>
<meta name="description" content="test" />
<base href="/" />
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
@Swimburger
Swimburger / BlazorWasmHeroku.sh
Last active November 2, 2021 11:55
Create and Deploy Blazor WASM to Heroku using heroku-buildpack-static (ubuntu)
#!/bin/bash
# start onetime setup
# make sure to have 'jq' installed
# sudo snap install jq
mkdir BlazorWasmHeroku
cd BlazorWasmHeroku
dotnet new blazorwasm
@Swimburger
Swimburger / InstallChromeDriver.Old.ps1
Last active September 4, 2023 03:42
Install ChromeDriver using PowerShell on Windows/Linux/MacOS, for more information read this blog post: https://swimburger.net/blog/powershell/download-the-right-chromedriver-on-windows-linux-macos-using-powershell
[CmdletBinding()]
param (
[Parameter(Mandatory = $True)]
[string]
$ChromeDriverOutputPath,
[Parameter(Mandatory = $false)]
[string]
$ChromeVersion,
[Parameter(Mandatory = $false)]
[Switch]
@Swimburger
Swimburger / Program.cs
Created January 28, 2021 23:21
Generic Boyer–Moore–Horspool Search Sequence in C#
using System;
using System.Collections.Generic;
using System.Linq;
class Program
{
static void Main(string[] args)
{
var numbers = Enumerable.Range(0, 1000).ToArray();
@Swimburger
Swimburger / Program.cs
Created January 28, 2021 23:18
Generic Linear Sequence Search in C#
using System;
using System.Collections.Generic;
using System.Linq;
class Program
{
static void Main(string[] args)
{
var numbers = Enumerable.Range(0, 1000).ToArray();
@Swimburger
Swimburger / Program.cs
Last active August 3, 2021 17:51
Generic QuickSort in C#
using System;
using System.Collections.Generic;
class Program
{
static void Main(string[] args)
{
var numbers = new int[] { 5, 4, 5, 7, 6, 9, 4, 1, 1, 3, 4, 50, 56, 41 };
QuickSort(numbers);
PrintList(numbers);
@Swimburger
Swimburger / Program.cs
Created January 27, 2021 21:19
Generic BinarySearch in C#
using System;
using System.Collections.Generic;
using System.Linq;
class Program
{
static void Main(string[] args)
{
var numbers = Enumerable.Range(0, 1000).ToArray();
@Swimburger
Swimburger / Program.cs
Last active January 27, 2021 21:19
Generic Merge Sort in C#
using System;
using System.Collections.Generic;
using System.Linq;
class Program
{
static void Main(string[] args)
{
var randomNumbers = new int[] { 5, 4, 5, 7, 6, 9, 4, 1, 1, 3, 4, 50, 56, 41 };
@Swimburger
Swimburger / Program.cs
Last active January 27, 2021 21:20
Generic Insertion Sort in C#
using System;
using System.Collections.Generic;
using System.Linq;
class Program
{
static void Main(string[] args)
{
var randomNumbers = new int[] { 5, 4, 5, 7, 6, 9, 4, 1, 1, 3, 4, 50, 56, 41 };
@Swimburger
Swimburger / Program.cs
Last active January 27, 2021 21:20
Generic Bubble Sort in C#
using System;
using System.Collections.Generic;
using System.Linq;
class Program
{
static void Main(string[] args)
{
var randomNumbers = new int[] { 5, 4, 5, 7, 6, 9, 4, 1, 1, 3, 4, 50, 56, 41 };
var sortedNumbers = BubbleSort(randomNumbers);