Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🐱‍🐉

Aaron Powell aaronpowell

💭
🐱‍🐉
View GitHub Profile
@aaronpowell
aaronpowell / LogicApp.json
Created Apr 17, 2019
Auto tweeting logic app
View LogicApp.json
{
"$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 Feb 26, 2019
C# parser in F#
View parser.cs
using System;
using System.Collections.Generic;
namespace Parser.CSharp
{
public static class ParserCSharp
{
public static string[] ParseCommandline(string input)
{
var items = new List<string>();
View agenda.js
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 Apr 10, 2018
Testing Fluidity with Chauffeur.TestingTools
View DemoTest.cs
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 Apr 19, 2017
Abusing JavaScript async
View async.js
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 Jun 21, 2016
Generic record type
View foo.fsx
let foo = (bar: 'a) ->
{ something: bar }
let baz = foo(1)
let baz2 = foo("a")
printf "bar: %d" baz.bar
printf "bar2: %s" baz2.bar
View promises.js
// 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
});
View UserList.jsx
var UserList = React.createClass({
render() {
return (
<table>
<thead>
<tr>
<th>Name</th>
<th></th>
</tr>
</thead>
View keybase.me
### 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:
@aaronpowell
aaronpowell / StringTypeProvider.fs
Created Feb 6, 2015
A basic Type Provider for taking a string and making something silly.
View StringTypeProvider.fs
namespace Samples.FSharp.StringTypeProvider
open System
open System.Reflection
open Samples.FSharp.ProvidedTypes
open Microsoft.FSharp.Core.CompilerServices
open Microsoft.FSharp.Quotations
[<TypeProvider>]
type StringTypeProvider(config: TypeProviderConfig) as this =
You can’t perform that action at this time.