Skip to content

Instantly share code, notes, and snippets.

View ChaseFlorell's full-sized avatar
🇨🇦

Chase Florell ChaseFlorell

🇨🇦
View GitHub Profile
@ChaseFlorell
ChaseFlorell / markdown.css
Last active December 26, 2023 19:29 — forked from imjasonh/markdown.css
.md *{
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
.md h1::before { content: "# "; }
/******************************************************************************
Online C Compiler.
Code, Compile, Run and Debug C program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <stdio.h>
#include <stdbool.h>
@ChaseFlorell
ChaseFlorell / uriSchemeWithHyperlinkFallback.js
Last active February 21, 2023 11:22
Ever want to launch a mobile app from within the browser, but ensure that the browser still redirects the user to the link if the app isn't installed? This took some fiddling around, but when the "ah ha" moment hit, the solution is really quite simple.
// tries to execute the uri:scheme
function uriSchemeWithHyperlinkFallback(uri, href) {
// set up a timer and start it
var start = new Date().getTime(),
end,
elapsed;
// attempt to redirect to the uri:scheme
// the lovely thing about javascript is that it's single threadded.
// if this WORKS, it'll stutter for a split second, causing the timer to be off
using System;
using System.Reactive.Disposables;
namespace cannect.Core
{
public class DisposableObject : ICancelable
{
public bool IsDisposed { get; private set; }
public void Dispose()
Set-Alias less "C:\Program Files\Git\usr\bin\less.exe"
function f($text, $files="*.*")
{
findstr /spin $text $files | less
}
@ChaseFlorell
ChaseFlorell / Execute.ps1
Last active July 28, 2021 11:03
Passing switches to child functions within PowerShell
# this is the final (child) function being called
function Invoke-Foo {
[cmdletbinding()]
param([switch] $Custom)
Write-Host 'Hello world'
Write-Verbose 'I''m a verbose message'
Write-Debug 'I''m a debug message' #this will pause execution
if($Custom.IsPresent){
Write-Host 'I''m a custom message'
@ChaseFlorell
ChaseFlorell / .gitconfig
Last active April 30, 2021 22:18
Customized Git Config
[user]
name = MY NAME
email = MY.EMAIL@gmail.com
initials = ME
[branches]
default = master
[rebase]
autoStash = true
[alias]
co = checkout
@ChaseFlorell
ChaseFlorell / baldurs_gate_3_keybindings.html
Created October 14, 2020 02:13
Baldur's Gate 3 (III) Keybindings, no ads, no fuss, no muss.
<!DOCTYPE html>
<html>
<body>
<table class="wiki_table sortable" style="width: 93.9397%; height: 2559px;">
<thead>
<tr>
<td>
<h4>ACTION</h4>
</td>
<td colspan="2">
@ChaseFlorell
ChaseFlorell / Deploy-TeamCityBuildToOctopus.ps1
Last active September 5, 2020 08:48
a script for TeamCity to get git commits and pass them along to Octopus Deploy
# credit for getting me going in the right direction
# http://blogs.lessthandot.com/index.php/uncategorized/access-git-commits-during-a-teamcity-build-using-powershell/
# these properties should be entered into your configuration parameters section
$project = "%Octopus.Project%"
$deployTo = "%Octopus.DefaultEnvironment%"
$buildVersion = "%BuildVersion%"
$octopusApiKey = "%Octopus.BuildDeployBot.APIKey%"
$octopusServer = "%Octopus.Server.Url%"
@ChaseFlorell
ChaseFlorell / CoucnbaseMappingTests.cs
Created July 17, 2020 14:34
Couchbase Mapping Idea
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using Couchbase.Lite;
using Couchbase.Lite.Mapping;
using FluentAssertions;
using NUnit.Framework;
// ReSharper disable TailRecursiveCall