Skip to content

Instantly share code, notes, and snippets.

Avatar

Adrian Seeley adrianseeley

View GitHub Profile
View 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;
View 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 Sep 7, 2019
File Crypto Stream
View encrypt.js
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 Apr 20, 2019
Python Open AI Gym Ubuntu Setup
View 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 Sep 8, 2017
TensorFlow CPU EC2 Popup Guide
View install.sh
# 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 Jan 26, 2018
Async Fetch JSON POST
View cors.error
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': '*'
}
View start.sh
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 Jul 23, 2017
iTunes Custom Sort
View app.js
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);
};
View calendar.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
namespace CalCal
{
class Program
View index.html
<html>
<head>
<title>Tic Tac Toe</title>
<style>
body {
text-align: center;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}