Skip to content

Instantly share code, notes, and snippets.

View rhysforyou's full-sized avatar

Rhys Powell rhysforyou

View GitHub Profile
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

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 / gist:8105807
Last active April 22, 2021 22:31
Nicer git log output in fish-shell
function glog --description 'Show git log'
git log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yello w)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
end
#!/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
git branch --merged | grep -Ev "\*|master|develop" | xargs -n 1 git branch -d $argv;
@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;
}
# 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
@rhysforyou
rhysforyou / gist:8e396099831aa44086af
Last active August 19, 2017 17:07
Ripping PS1 Games on OS X

Note: This method doesn't work for multitrack game disks that I've tried, such as those that include audio files on separate tracks like Vib Ribbon.

Also don't go using this method to distribute copies of PS1 games on the internet. That's super illegal and uncool.

  1. Insert the game disk, wait for it to mount
  2. Open Disk Utility, right click the game disk, and choose Unmount
  3. Open Terminal and run diskutil list, make note of where the game disk was mounted (something like /dev/disk3)
  4. Run sudo dd if=<disk> of=foo.iso where <disk> is the mount point we got in the last step (you can call the ISO whatever you want)
  5. Download LiquidCD and extract it
  6. Open LiquidCD, go to the Others tab, and then click Choose a disk image… supplying the disk image you made last step, if asked, let it analyse the tracks in that ISO