Skip to content

Instantly share code, notes, and snippets.

View rhysforyou's full-sized avatar

Rhys Powell rhysforyou

View GitHub Profile
#!/usr/bin/swift
import Foundation
struct Device: Codable {
enum State: String, Codable {
case shutdown = "Shutdown"
case booted = "Booted"
}
let state: State
-----BEGIN PGP PUBLIC KEY BLOCK-----
Comment: https://keybase.io/download
Version: Keybase Go 3.0.0 (darwin)
xsFNBFxjpwQBEADQzFhmi/KHsqXgluSe2dLGtLdUBTBbNL27vo8CEh5XNSwf1Gc7
W8qZBVg93J+AQRLQ50c6AMux2if+AOUIdy6K74icNnv6smb2BZQxhn80egojzg+W
PHC7NzpHBkrIox8z+V4gxYHsZmOyDrjjWFFJjwmdJ+q5efFu2OcOeek8h3cQSk+f
gZ47LpfjPYc6rQhUzYnoWxOjRaRhkQXdM59o6XBwfX5kiZiZ6tKW6usPLGDHTjL6
nHvng+b580iMLFMRjmi2+Nmwuo5hEL6FRy4J1mmkzjTiSPPxwMs9cPYMZxxFVdlf
ZRKDVB2qf/N5QMr1Uf3cfBgJ0hIy1vW6KfB0AR1INosXGbE/PPC0LLYgv6IpYCxQ

Keybase proof

I hereby claim:

  • I am rhysforyou on github.
  • I am rpowelll (https://keybase.io/rpowelll) on keybase.
  • I have a public key ASAXhOtYeX4MELtilPTiqwk7r4or5t34seCZ8VVGd1Vzfgo

To claim this, I am signing this object:

@rhysforyou
rhysforyou / reredux.js
Created November 13, 2018 01:04
Redux but without support for middleware
class Store {
constructor(reducer, preloadedState = undefined) {
this.reducer = reducer;
this.state = reducer(preloadedState, { type: '@@INIT' });
this.listeners = [];
}
getState() {
return this.state;
}
git branch --merged | grep -Ev "\*|master|develop" | xargs -n 1 git branch -d $argv;
# Fail2Ban configuration file
#
# Author: Cyril Jaquier
# Modified by Yaroslav Halchenko for multiport banning and Lukas Camenzind for persistent banning
#
#
[Definition]
# Option: actionstart
# Notes.: command executed once at the start of Fail2Ban.
# Values: CMD
@rhysforyou
rhysforyou / Dockerfile
Created February 1, 2018 23:07
Testing setup from Ticketek Web Payments
FROM node
# Create app directory
RUN mkdir /app
WORKDIR /app
RUN apt-get update \
&& apt-get install awscli -y
# Install app dependencies
Shader "Learning Shaders/Image Based Lighting"
{
Properties
{
_MainTex ("Albedo Map", 2D) = "white" {}
_NormalTex ("Normal Map", 2D) = "white" {}
_EnvTex ("Environment Map", Cube) = "black" {}
_SpecColor ("Specular Color", Color) = (1,1,1,1)
_Gloss ("Gloss", Range(0, 1)) = 0.5
_Shininess ("Shininess", Range(0, 100)) = 10
{
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36",
"lighthouseVersion": "2.3.0",
"generatedTime": "2017-07-31T23:00:37.992Z",
"initialUrl": "https://rpowelll.github.io/",
"url": "https://rpowelll.github.io/",
"audits": {
"is-on-https": {
"score": true,
"displayValue": "",
// @flow
import React from 'react';
import Form from 'components/drafts/form';
import Heading from 'components/heading/heading';
import Button from 'components/button/button';
import DetailsFormSection from './details';
import PartyFormSection from './party';
import WeightsFormSection from './weights';
import FreightFormSection from './freight';