Skip to content

Instantly share code, notes, and snippets.

View jkodroff's full-sized avatar

Josh Kodroff jkodroff

View GitHub Profile
@br3ndonland
br3ndonland / github-actions-notes.md
Last active June 22, 2024 12:28
Getting the Gist of GitHub Actions
@dcwangmit01
dcwangmit01 / main.go
Last active March 2, 2024 14:54
Self-templating with golang text/template and gomplate
/*
Demo program illustrating usage of gomplate as a library.
This program will accept an input file and run it through the templating
engine as both the values dictionary as well as the template file. It will
repeat the process until the templating result stops changing, and print
the result to STDOUT.
This program add the gomplate datasources and functions to the golang
text/template engine. This requires the input to be have the gomplate
@DanDiplo
DanDiplo / JS-LINQ.js
Last active June 25, 2024 23:39
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version):
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
@DalSoft
DalSoft / ExampleModel.cs
Created January 10, 2012 12:33
ASP.NET MVC 3 - Improved JsonValueProviderFactory using Json.Net
//Example of a model that won't work with the current JsonValueProviderFactory but will work with JsonDotNetValueProviderFactory
public class CmsViewModel
{
public bool IsVisible { get; set; }
public string Content { get; set; }
public DateTime Modified { get; set; }
public DateTime Created { get; set; }
//This property will not work with the current JsonValueProviderFactory
public dynamic UserDefined { get; set; }
}