Skip to content

Instantly share code, notes, and snippets.

View bennage's full-sized avatar
📺
please stay tuned

Christopher Bennage bennage

📺
please stay tuned
View GitHub Profile
@bennage
bennage / example.deploy.json
Last active April 28, 2021 16:57
assigning a role for storage access
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"guid": {
"type": "string",
"defaultValue": "[newGuid()]"
}
},
"variables": {
@bennage
bennage / clean-up.sh
Created April 22, 2021 17:33
bash script for deleting all resource groups matching a pattern
#!/usr/bin/env bash
groups=$(az group list --query "[?contains(name,'bennage')].name")
for row in $(echo "${groups}" | jq -r '.[]'); do
_remove() {
echo ${row}
az group delete -y --no-wait -g ${row}
}
@bennage
bennage / deployment-test.md
Created March 17, 2021 16:42
testing the Percept deployment

Deploy to Azure

import * as foo from "foo"
var $foo = require("foo");
var foo = $foo;
import foo from "foo"
var $foo = require("foo");
var foo = $foo.default;
import { foo } from "foo"
var $foo = require("foo");
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Data;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using System.Reactive.Linq;

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@bennage
bennage / sliding_window.cs
Last active August 29, 2015 14:02
is there an Rx method that already does this?
namespace RxTest
{
using System;
using System.Collections.Generic;
using System.Linq;
using Chunk = System.Collections.Generic.List<int>;
internal class Program
{
@bennage
bennage / ideas.md
Last active August 29, 2015 14:02
What questions do you have about participating in open source?

Are you new to open source? What sort of questions, concerns, or even fears do you have?

Culture

  • How do I start contributing to other projects?
  • How can I encourage contribution to my project?
  • Who should have commit rights?
  • What commitment am I making by opening my source?
  • How do I establish a community?
  • What expectations will the community have?
@bennage
bennage / bits.cs
Created March 19, 2014 23:46
counting bits
using System;
namespace Bits
{
class Program
{
static void Main(string[] args)
{
var lookup = BuildLookup();
@bennage
bennage / alias.cs
Created March 10, 2014 23:10
making tuples a little easier to work with
namespace AliasFun
{
using MyRecord = System.Tuple<string, int>;
public class AnExample
{
public void Demonstrating()
{
var record = new MyRecord("thing", 42);
}