Skip to content

Instantly share code, notes, and snippets.

Gaeel Bradshaw-Rodriguez Bradshaw

Block or report user

Report or block Bradshaw

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Bradshaw
Bradshaw / parseWebring.js
Last active Jul 5, 2019 — forked from ckipp01/parseWebring.js
Example of how to parse XXIIVV webring sites.js file
View parseWebring.js
const request = require('request')
const gatherSiteObjects = () => {
return new Promise((resolve, reject) => {
request('https://webring.xxiivv.com/data/sites.json', (err, _, body) => {
if (!err) {
const siteObjects = JSON.parse(body)
resolve(siteObjects)
} else reject(err)
})
@Bradshaw
Bradshaw / GetMainTextureThing.cs
Created Apr 26, 2019
Example of detection of terrain texture at position
View GetMainTextureThing.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GetMainTextureThing : MonoBehaviour
{
TerrainData mTerrainData;
int alphamapWidth;
int alphamapHeight;
View NicknameGenerator.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NicknameGenerator : MonoBehaviour
{
public TextAsset examples;
public int segmentLength = 3;
View Maze.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Maze : MonoBehaviour
{
Node[,] maze;
public int width;
public int height;
View pictoselect.cs
string PrintMe(){
Dictionary<string,string> pictos = new Dictionary<string,string>();
pictos.Add("ur", "");
pictos.Add("ulr", "");
pictos.Add("dlr", "");
pictos.Add("udr", "");
pictos.Add("lr", "");
pictos.Add("udlr", "");
pictos.Add("dr", "");
pictos.Add("dl", "");
@Bradshaw
Bradshaw / PulseOnBeat.cs
Last active Jan 29, 2019
Simple beat follower script demo
View PulseOnBeat.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
public class PulseOnBeat : MonoBehaviour {
public float minScale;
public float maxScale;
@Bradshaw
Bradshaw / horriblesort.lua
Created Nov 20, 2018
Horrible Sort in Lua
View horriblesort.lua
-- Creates a table containing the values 1 through num
function tableOf(num)
local t = {}
for i=1,num do
t[i] = i
end
return t
end
-- Shuffles a table
@Bradshaw
Bradshaw / Blob.shader
Last active Nov 16, 2018
Unity move vertex shader thing
View Blob.shader
Shader "Custom/Blob" {
Properties {
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_PushTex ("Thing", 2D) = "white" {}
_Push ("Push", Range(-1,1)) = 0.0
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 200
View Walkabout.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Walkabout : MonoBehaviour {
public float acceleration = 1;
public float friction;
public float radius;
Vector3 velocity;
View FPS.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class FPS : MonoBehaviour {
Text text;
float smootheddt = 1 / 60;
float smoothvel;
List<float> last100;
You can’t perform that action at this time.