Skip to content

Instantly share code, notes, and snippets.

@acolyer
acolyer / jessfraz.md
Created November 19, 2017 13:39
Containers, operating systems and other fun things from The Morning Paper
@daveaglick
daveaglick / feedly.opml
Created November 14, 2017 14:41
Feedly OPML
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Dave subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="Development" title="Development">
<outline type="rss" text="Scott Hanselman" title="Scott Hanselman" xmlUrl="http://feeds.feedburner.com/ScottHanselman" htmlUrl="https://www.hanselman.com/blog/"/>
<outline type="rss" text="Cetus" title="Cetus" xmlUrl="https://feeds.feedburner.com/cetus/fVRw" htmlUrl="https://cetus.io/"/>
@yreynhout
yreynhout / EventStoreCollection.cs
Last active May 9, 2020 20:45
Recipe for an EventStoreFixture using Docker.DotNet
using Xunit;
namespace TheDukesOfDocker
{
[CollectionDefinition(nameof(EventStoreCollection))]
public class EventStoreCollection : ICollectionFixture<EventStoreFixture>
{
}
}
@aturley
aturley / pony-considerations.md
Last active March 17, 2023 03:21
Information about Pony based on the items outlined in https://twitter.com/casio_juarez/status/898706225642086400

Pony Considerations

If you're thinking of checking out the Pony programming language, here's a list of things that I think are important to know. This list is based on a Tweet that I wrote.

Editor/IDE support

There are Pony packages for several popular editors.

@johnkors
johnkors / git-prune-merged.ps1
Last active March 22, 2023 22:23
PowerShell script to delete branches merged to master
# update local list of pruned branches on the remote to local:
git fetch --prune
# delete branches on remote origin that have been merge to master
git branch --merged remotes/origin/master -r | %{$_.trim().replace('origin/', '')} | ?{$_ -notmatch 'master'} | %{git push --delete origin $_}
# delete local branches that have been merged to master
git branch --merged remotes/origin/master | %{$_.trim()} | ?{$_ -notmatch 'master'} | %{git branch -d $_}
# remove stale refs (local refs to branches that are gone on the remote)
@NickCraver
NickCraver / Svg.cs
Created February 1, 2017 22:36
A simple SVG helper for Stack Overflow that inlines SVGs into Razor views efficiently
using System;
using System.IO;
using System.Web;
using System.Web.Hosting;
namespace StackOverflow.Helpers
{
public static class Svg
{
// NOTE: To add a new SVG icon, copy paste the line below. Paste it after the other ones.
@ccashwell
ccashwell / QuillTable.jsx
Last active November 2, 2017 22:35
Building Proof-of-Concept Table Support for Quill.js using React Components
import Quill from 'quill'
import TableComponent from 'TableComponent'
import ReactDOM from 'react-dom'
const QuillEmbed = Quill.import('blots/block/embed');
class QuillTable extends QuillEmbed {
static create(values) {
let node = super.create(values);
@reidev275
reidev275 / Doc.md
Last active September 4, 2016 16:04
Helpers for dealing with Razor in a more functional way.

I ❤️ higher order functions and generally refuse to write non recursive looping structures. With Razor though I didn't have a great way of displaying lists without looping.

###Usage

The following code will render the _link partial for every item in the links list. It is basically a functor from data to output given a template.

@Html.RenderPartials("_link", links)

Without this extension I would have to write something like this

@isaacabraham
isaacabraham / ThoughtworksRover.fsx
Created May 17, 2016 20:21
Sample solution to Thoughtworks Rover challenge
// A few patterns to make it a bit easier to reason about the raw text. A more typesafe implementation might use full discriminated unions.
let (|North|South|East|West|) = function | "N" -> North | "S" -> South | "E" -> East | "W" -> West | _ -> failwith "Unknown direction"
let (|Rotate|MoveForward|) = function | 'L' | 'R' -> Rotate | 'M' -> MoveForward | _ -> failwith "Unknown command"
let (|Left|Right|) = function | 'L' -> Left | 'R' -> Right | _ -> failwith "Unknown command"
/// A DTO to represent the Rover
type Rover = { X : int; Y : int; Direction : string }
/// Moves the rover forward one unit.
let driveForward rover =
@nolanlawson
nolanlawson / es6modules.md
Last active September 1, 2016 00:00
The case for Rollup and ES modules in frontend code

The case for Rollup and ES modules in frontend code

TLDR: Rollup and ES modules give us:

  • smaller bundles due to tree-shaking and scope-hoisting, and
  • faster runtime perf than CommonJS, by avoiding runtime module resolution

Sources to back up these wild claims: