Skip to content

Instantly share code, notes, and snippets.

View adrianseeley's full-sized avatar

Adrian Seeley adrianseeley

  • Adrian Seeley
  • Canada
View GitHub Profile
@adrianseeley
adrianseeley / Ease.cs
Created February 1, 2023 11:18
Updated Ease
/// <summary>
/// Use:
/// 1. Create a new instance of the ease class where steps are time, and values are
/// the value you want to ease over that time.
/// For example moving 100 pixels in 3 seconds:
///
/// Ease myEase = new Ease
/// (
/// currentStep: 0f,
/// totalSteps: 3f,
positive_width = 185;
positive_length = 370;
positive_thick = 3;
lip_height = 3;
lip_width = 3;
negative_oversize = 3;
double_negative_oversize = 3;
module positive()
@adrianseeley
adrianseeley / UnityScreenshot.cs
Created June 27, 2020 22:00
UnityScreenshot.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
public class UnityRoboTester : MonoBehaviour
{
public Camera Camera;
private RenderTexture RenderTexture;
private Texture2D Image;
@adrianseeley
adrianseeley / svg.html
Created April 13, 2020 12:08
SVG HTML
<html>
<body id="body">
<div id="svgparent"></div>
<button id="download">Download SVG</button>
</body>
<script>
const cutColor = "red";
const labelColor = "blue";
const createSVG = (w, h) => {
@adrianseeley
adrianseeley / encrypt.js
Last active October 19, 2022 05:44
File Crypto Stream
const args = process.argv.slice(2);
const crypto = require('crypto');
const algorithm = 'aes-256-ctr';
const password = 'seelflix';
const fs = require('fs');
const path = require('path');
function read_dir (dir) {
return fs.statSync(dir).isDirectory() ? Array.prototype.concat(...fs.readdirSync(dir).map(f => read_dir(path.join(dir, f)))) : dir;
};
@adrianseeley
adrianseeley / Python Open AI Gym Ubuntu Setup
Last active July 28, 2022 21:45
Python Open AI Gym Ubuntu Setup
sudo apt-get update
sudo apt-get install python3.6
sudo apt install python3-pip
sudo apt-get -y install cmake
sudo apt install zlib1g-dev
sudo apt-get install p7zip-full
pip3 install numpy
pip3 install sklearn
pip3 install gym
pip3 install gym[Box2D]
@adrianseeley
adrianseeley / install.sh
Last active September 8, 2017 17:42
TensorFlow CPU EC2 Popup Guide
# udpate yum
sudo yum update
# install git
sudo yum install git
# install python 3
sudo yum install python35
# install pip 3
@adrianseeley
adrianseeley / cors.error
Last active January 26, 2018 17:07
Async Fetch JSON POST
Getting cors errors using lambda? make sure your lambda response as well as your api gateway has cors established
(in your lambda response)
headers: {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*'
}
@adrianseeley
adrianseeley / start.sh
Created July 28, 2017 14:07
Node Popup ec2
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm install 8.2.1
node -e "console.log('Running Node.js ' + process.version)"
wget ZIPURL
unzip ZIPNAME
node FILENAME
@adrianseeley
adrianseeley / app.js
Created July 23, 2017 16:43
iTunes Custom Sort
const inFile = './Game.xml';
const outFileDiscover = './GameDiscover.xml';
const outFileExploit = './GameExploit.xml';
const fs = require('fs');
const regexIndexOf = (str, regex, end) => {
var match = str.match(regex);
return match.index + (end ? match[0].length : 0);
};