Skip to content

Instantly share code, notes, and snippets.

View Bambofy's full-sized avatar
Drinking coffee and coding!

Richard Bamford Bambofy

Drinking coffee and coding!
  • England
  • 09:32 (UTC +01:00)
View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenTK;
namespace FallingSpheres.Components
{
public class Component
@Bambofy
Bambofy / default.frag
Last active September 24, 2015 13:05
Halp plox
#version 330
out vec4 outColour;
void main()
{
outColour = vec4(1.0, 0.0, 0.0, 1.0);
}
@Bambofy
Bambofy / links.md
Last active August 29, 2015 14:23
Programming Links - Richard
/////////////////////////////////////////////////////////////////////////
// RICHARD BAMFORD - 2015 - University Of Hull - Embedded Systems Club //
/////////////////////////////////////////////////////////////////////////
#include <LiquidCrystal.h>
// Accelerometer pins
#define XPIN 1
#define YPIN 2
// This is the average number which the accelerometer rests at.
#define NORM 344
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Net.NetworkInformation;
using OpenTK;
using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL4;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SFML;
using SFML.Window;
using SFML.Graphics;
namespace Chess
@Bambofy
Bambofy / main.js
Created June 24, 2014 11:26
Node script to convert bookmarks html file into a simple html link list. Requires apricot.
var Apricot = require('apricot').Apricot;
var fs = require('fs');
var htmlBuffer = "<ul>";
// Element layout -- TODO --- -- TODO ----
// element = {name="", herf="", add_date="", icon_data=""}
// Useage:
// node main.js FILENAME.html
@Bambofy
Bambofy / ConverterFunction
Created December 27, 2013 12:55
Converting String to Keyboard.Key (SFML C#)
public Keyboard.Key ConvertFromString(string keystr)
{
return (Keyboard.Key) Enum.Parse(typeof (Keyboard.Key), keystr);
}
@Bambofy
Bambofy / encoderdecoder
Created October 24, 2013 15:20
Simple encoding/decoding in Lua
local datetime = os.date("*t");
local function convert( chars, dist, inv )
return string.char( ( string.byte( chars ) - 32 + ( inv and -dist or dist ) ) % 95 + 32 )
end
local function crypt(str, k, inv)
local enc= "";
for i=1,#str do
if (#str-k[5] >= i or not inv) then
function bubbleSort( L )
local newL = {}
for k,v in pairs( L ) do
if (k+1) > tableLength( L ) then -- end of the array
newL[k] = L[k]
break
end
if L[k] > L[k+1] then