Skip to content

Instantly share code, notes, and snippets.

View aaronpowell's full-sized avatar
😶‍🌫️

Aaron Powell aaronpowell

😶‍🌫️
View GitHub Profile
@aaronpowell
aaronpowell / update_notifications-rev.yaml
Created December 5, 2023 01:27 — forked from mdegat01/update_notifications.yaml
Update Notifications Automation Blueprint
blueprint:
name: Update notifications
description: Send notifications for new updates and install or skip on action
homeassistant:
min_version: 2022.4.0
domain: automation
input:
update_entities:
name: Update entities
description:
@aaronpowell
aaronpowell / LogicApp.json
Created April 17, 2019 11:14
Auto tweeting logic app
{
"$connections": {
"value": {
"rss": {
"connectionId": "/subscriptions/7e2b0a07-47db-4a2e-bfca-03c0d5b75f15/resourceGroups/personal-website/providers/Microsoft.Web/connections/rss",
"connectionName": "rss",
"id": "/subscriptions/7e2b0a07-47db-4a2e-bfca-03c0d5b75f15/providers/Microsoft.Web/locations/southcentralus/managedApis/rss"
},
"twitter": {
"connectionId": "/subscriptions/7e2b0a07-47db-4a2e-bfca-03c0d5b75f15/resourceGroups/personal-website/providers/Microsoft.Web/connections/twitter",
@aaronpowell
aaronpowell / parser.cs
Last active February 26, 2019 01:00
C# parser in F#
using System;
using System.Collections.Generic;
namespace Parser.CSharp
{
public static class ParserCSharp
{
public static string[] ParseCommandline(string input)
{
var items = new List<string>();
import * as cheerio from 'cheerio'
export const fetchAgenda = async () => {
const response = await fetch('https://ndcsydney.com/agenda')
const body = await response.text()
const talks = []
const $ = cheerio.load(body)
$('section.day').map((i, el) => {
// prettier-ignore
@aaronpowell
aaronpowell / DemoTest.cs
Created April 10, 2018 23:43
Testing Fluidity with Chauffeur.TestingTools
using Chauffeur.TestingTools;
using Fluidity.Configuration;
using Fluidity.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Umbraco.Core;
using Xunit;
@aaronpowell
aaronpowell / async.js
Created April 19, 2017 03:58
Abusing JavaScript async
function async(async) {
return new Promise(res =>
setTimeout(() => (console.log(async), res()), 1000)
);
}
async function await() { await async('hello'); }
await();
@aaronpowell
aaronpowell / foo.fsx
Last active June 21, 2016 01:04
Generic record type
let foo = (bar: 'a) ->
{ something: bar }
let baz = foo(1)
let baz2 = foo("a")
printf "bar: %d" baz.bar
printf "bar2: %s" baz2.bar
// assuming http://www.html5rocks.com/en/tutorials/es6/promises/
var arr = [1, 2, 3, 4, 5];
var promises = arr.map(x => $.getJSON('/foo/bar?baz=' + x));
Promise.all(promises)
.then((result1, result2, result3, result4, result5) => {
//merge results
});
var UserList = React.createClass({
render() {
return (
<table>
<thead>
<tr>
<th>Name</th>
<th></th>
</tr>
</thead>
@aaronpowell
aaronpowell / keybase.me
Created February 26, 2015 03:11
keybase.md
### Keybase proof
I hereby claim:
* I am aaronpowell on github.
* I am apowell (https://keybase.io/apowell) on keybase.
* I have a public key whose fingerprint is 8EC6 C2E9 DDBE AA3A 86AD 964B 2CAF 935F B911 159E
To claim this, I am signing this object: