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
  • 17:03 (UTC +01:00)
View GitHub Profile
class Texture2DHighDPI
{
public:
Texture2DHighDPI(Texture2D * texture, Vector2 pos, Vector2 size);
void SetPosition(Vector2 pos);
void SetSize(Vector2 size);
void Draw();
private:
Texture2D * m_texture;
Vector2 m_position;
#include <iostream>
#include <filesystem>
#define bits_in_int (sizeof(int) * 8)
#define bits_in_char (sizeof(char) * 8)
namespace fs = std::experimental::filesystem;
char* wchar_to_char(const wchar_t* pwchar)
{
@Bambofy
Bambofy / loralib_recieve_FSK_switching.ino
Created August 14, 2018 20:05
example of switching between FSK and LoRa modem mode.
/*
LoRaLib Transmit Example
This example transmits LoRa packets with one second delays
between them. Each packet contains up to 256 bytes
of data, in the form of:
- Arduino String
- null-terminated char array (C-string)
- arbitrary binary data (byte array)
local path = ... .. "."
local loader = {}
loader.version = "0.0.2"
function loader.load(path, filename)
loader.object = {
v = {}, -- List of vertices - x, y, z, [w]=1.0
vt = {}, -- Texture coordinates - u, v, [w]=0
vn = {}, -- Normals - x, y, z
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CodeADay
{
class Program
{
static void Main(string[] args)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CodeADay
{
class Program
{
@Bambofy
Bambofy / 08227_acw_exe_run_multiple.py
Created April 24, 2016 13:10
This was one of two scripts produced for a piece of coursework at the University of Hull for the 08227 ACW 2016. Placed in the same directory as the Navigation.exe. EXAMPLE USE "python this_script.py smalldataset".
import os
import sys
import re
import subprocess
exeCallCount = 100
dataSetPartialName = sys.argv[1] ## only import data from files with s in the name.
cwd = os.path.dirname(os.path.abspath(__file__)) ## current working directory
@Bambofy
Bambofy / 08227_acw_data_to_csv.py
Last active April 24, 2016 13:11
This was one of two scripts produced for a piece of coursework at the University of Hull for the 08227 ACW 2016. Placed in C:/timings directory. EXAMPLE USEAGE "python this_script.py smalldataset"
import os
import sys
import re
import subprocess
processedRows = 0
dataSetPartialName = sys.argv[1] ## only import data from files with s in the name.
## remove text and write to outfile
<html>
<head>
</head>
<body>
<style>
html {
display:block;
}
</style>
<script type="text/javascript" src="js/dglBuffer.js"></script>
@Bambofy
Bambofy / rough_test_dgl.js
Created February 17, 2016 12:18
initial testing for dragongl.
<html>
<head>
<title>DragonGL</title>
<script type="x-shader/vertex" id="vs-glsl">
precision mediump float;
attribute vec2 vVertex;
attribute vec2 vTexcoord;