Skip to content

Instantly share code, notes, and snippets.

View forksofpower's full-sized avatar
:shipit:

Patrick Jones forksofpower

:shipit:
View GitHub Profile

Keybase proof

I hereby claim:

  • I am forksofpower on github.
  • I am forksofpower (https://keybase.io/forksofpower) on keybase.
  • I have a public key ASDoSgFGsOpy5R8WHZOlc7G2GD8z11_KbOIM2JTggbCfQAo

To claim this, I am signing this object:

@forksofpower
forksofpower / retina-damage.css
Created August 21, 2017 23:19
Simulate retina damage
// This style was pulled from: https://www.theguardian.com/science/2017/aug/21/solar-eclipse-eye-damage
body {
animation: eclipsed 8s ease-out infinite;
opacity: 0.4;
filter: blur(1px);
}
@forksofpower
forksofpower / *particles-example.md
Last active September 28, 2017 07:00
Particle Example
@forksofpower
forksofpower / mac_network_drive_reconnect.md
Last active October 17, 2017 22:41
Mac network drives reconnect

mac-network-drive-reconnect

A bash script for reconnecting network drives


TODO

  • organize necessary commands for macOs
  • identify event triggering service
  • replace absolute local network address with command line param
  • test on mac
  • package for use with job runner
class Animal {
    constructor(public name) { }
    move(meters) {
        alert(this.name + " moved " + meters + "m.");
    }
}

class Snake extends Animal {
 constructor(name) { super(name); }
@forksofpower
forksofpower / idea_board.md
Created June 29, 2018 16:27
An awesome list of ideas that Deyton and Patrick want to try out!

List of Ideas!

  • ideas one
  • idea 2

"""scala // Basic Syntax object ScalaNotes { def main(args: Array[String]) { println("Hello, World!") // prints hello world } } """

@forksofpower
forksofpower / findRandomGame.js
Created March 3, 2019 06:37 — forked from theoperatore/findRandomGame.js
Get random game metadata via giant-bomb api for any platform
// depends on fetch, async/await (node 8.2.1+)
require('isomorphic-fetch');
const getAllPlatforms = async apiKey => {
const rawResponse = await fetch(`http://www.giantbomb.com/api/platforms?api_key=${apiKey}&format=json&field_list=name,id`);
const response = await rawResponse.json();
// check response.error === "OK" && repsonse.status_code === 1
return response.results;
}
@forksofpower
forksofpower / random_color.rb
Last active March 12, 2020 02:59
Get random color value
def random_color(code="hex")
rgb = []
# generate 3 random color values
3.times {rgb << (rand() * 255).floor}
# Return the rgb array or convert to hex
# if hex, take into account zero padding
if code === "rgb"
color = rgb
else
@forksofpower
forksofpower / rails_controller_example.rb
Created April 9, 2020 15:45
Rails Controller Example with Error Messages
class StudentsController < ApplicationController
before_action :find_student, except: [:index, :new, :create]
def index
@students = Student.all
end
def show
end