Skip to content

Instantly share code, notes, and snippets.

View dallinbeutler's full-sized avatar

Dallin Beutler dallinbeutler

View GitHub Profile
@Makeshift
Makeshift / tutorial.md
Last active July 26, 2024 10:46
Tutorial for automatically syncing an Obsidian vault with Git on an Android device

How to sync Obsidian with Git on Android

Limitations

  • If Termux is closed in the background by Android, the cron service will stop updating your repository and you must open Termux again. Refer to instructions for your device model to disable the killing of certain background applications.
  • This may negatively affect your devices battery life. I'm not entirely sure yet.

Setup

@JordanMarr
JordanMarr / MainWindow.xaml
Last active January 16, 2022 16:28
Example of Using Elmish.WPF + Rx
<Window x:Class="ConsoleApp.Wpf.Views.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ConsoleApp.Wpf.Views"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid Margin="0,25,0,0">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Top">
@jwosty
jwosty / StateBuilder.fsx
Created March 24, 2016 23:44
F# state monad / computation expression builder, and example usage
open System
open System.IO
type State<'s, 'a> = State of ('s -> ('a * 's))
module State =
let inline run state x = let (State(f)) = x in f state
let get = State(fun s -> s, s)
let put newState = State(fun _ -> (), newState)
let map f s = State(fun (state: 's) ->
@xanathar
xanathar / Easing.cs
Created March 17, 2016 23:54
Robert Penner's easing equations for Unity
/**
* Easing
* Animates the value of a float property between two target values using
* Robert Penner's easing equations for interpolation over a specified Duration.
*
* Original Author: Darren David darren-code@lookorfeel.com
*
* Ported to be easily used in Unity by Marco Mastropaolo
*
* Credit/Thanks:
@jack-pappas
jack-pappas / _simple.fs
Last active May 10, 2023 07:09
Fixed-length arrays in F#
// Original code posted in fsharp-opensource discussion:
// https://groups.google.com/forum/#!topic/fsharp-opensource/pI73-GkoxbY
namespace Blah
open System.Runtime.InteropServices
[<Struct>]
type vec3_t =
@madd0
madd0 / ShellIcon.cs
Created December 5, 2011 11:43
Get a small or large Icon with an easy C# function call that returns a 32x32 or 16x16 icon.
// -----------------------------------------------------------------------
// <copyright file="ShellIcon.cs" company="Mauricio DIAZ ORLICH (madd0@madd0.com)">
// Distributed under Microsoft Public License (MS-PL).
// http://www.opensource.org/licenses/MS-PL
// </copyright>
// -----------------------------------------------------------------------
/// <summary>
/// Get a small or large Icon with an easy C# function call