Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

bosley bosley

🏠
Working from home
View GitHub Profile
View fib.go
package main
import (
"fmt"
)
// Calculate fib sequence
// This is done linerally as recursive calculation is an exponential explosion
// in time, and after the around 35th digit or so would be unreasonable to calculate
//
View reentrant_memory_function.asm
; ASM File for the Nabla VM
; https://github.com/NablaVM
; - This file utilizes the special functionality of functional units along
; side yield's reentry functionality as a POC
; for using them together as a memory storage unit
.file "memory_play"
.init main
@bosley
bosley / PubSub_with_ifs.cpp
Created Apr 2, 2020
A simple pubsub example using an interface in C++
View PubSub_with_ifs.cpp
#include <iostream>
#include <string>
#include <vector>
namespace {
// An interface for objects that want to 'be' subscribers
class SubscriberIf {
public:
View Bitwise_example.cpp
#include <bitset>
#include <iostream>
void showXorOp() {
uint8_t var = 0xFF; // 255
uint8_t var1 = 0X0F; // 15
std::cout << (int)var << "\t" << std::bitset<8>(var) << std::endl;
@bosley
bosley / gist:4336d2be8908adc0da7e
Created Jul 19, 2015
Centos 7 Python3.3 Install
View gist:4336d2be8908adc0da7e
yum groupinstall "Development Tools" -y
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel -y
wget http://python.org/ftp/python/3.3.5/Python-3.3.5.tar.xz
tar xf Python-3.3.5.tar.xz
cd Python-3.3.5
./configure --prefix=/usr/local --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
make && make altinstall
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py