Skip to content

Instantly share code, notes, and snippets.

View AverageMarcus's full-sized avatar
👋
¯\_(ツ)_/¯

Marcus Noble AverageMarcus

👋
¯\_(ツ)_/¯
View GitHub Profile
@AverageMarcus
AverageMarcus / Dockerfile
Created September 2, 2021 08:49
Example multi-arch Dockerfile for Go projects
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.16 as builder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETOS
ARG TARGETARCH
WORKDIR /app/
ADD . .
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-w -s" -o yourapplication main.go
apiVersion: v1
kind: Namespace
metadata:
name: ingress-nginx
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
---
@AverageMarcus
AverageMarcus / Hackathons.md
Last active December 13, 2016 15:58
Upcoming hackathons I've found in the UK. Feel free to comment with more.
  • Visual representation of cross-community membership
  • App that checks fot tweets from a given area, and based on the emoji used decide is that area is happy or sad as a whole.
#include "U8glib.h"
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NO_ACK);
#define Egg_width 24
#define Egg_height 25
static unsigned char Egg_bits[] U8G_PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x62, 0x00, 0x00, 0xe1, 0x00, 0x80, 0xe3, 0x01, 0x80, 0xe7, 0x01, 0xc0, 0xe7, 0x03, 0xc0, 0xc7, 0x03, 0xe0, 0x87, 0x07, 0xe0, 0x07, 0x04, 0xe0, 0x03, 0x04, 0xe0, 0x03, 0x04, 0xe0, 0x81, 0x07, 0x20, 0xc0, 0x07, 0x40, 0xe0, 0x03, 0x40, 0xe0, 0x03, 0xc0, 0xe1, 0x03, 0xe0, 0xff, 0x07, 0xe0, 0xff, 0x07, 0x80, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
#define Egg2_width 24
#define Egg2_height 25
static unsigned char Egg2_bits[] U8G_PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0xc3, 0x00, 0x80, 0xc0, 0x01, 0xc0, 0xc1, 0x03, 0xc0, 0xc3, 0x03, 0xe0, 0xc3, 0x07, 0xe0, 0x83, 0x07, 0xf0, 0x03, 0x0f, 0xf0, 0x01, 0x08, 0xf0, 0x00, 0x0f, 0x10, 0x80, 0x0f, 0x20, 0xc0, 0x
@AverageMarcus
AverageMarcus / Hulk.ino
Created March 1, 2015 16:13
Hulk Smash!
#include "U8glib.h"
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NO_ACK);
#define Hulk_width 60
#define Hulk_height 60
static unsigned char Hulk_bits[] U8G_PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xf8, 0x9f, 0x01, 0x00, 0xf0, 0xe0, 0x3f, 0x00, 0xf8, 0x9f, 0x01, 0x00, 0xf0, 0xe0, 0x3f, 0x00, 0x06, 0xf0, 0x31, 0x60, 0xf0, 0x1f, 0xc0, 0x0
@AverageMarcus
AverageMarcus / PeanutButterJellyTime.ino
Created February 28, 2015 14:35
It's Peanut butter jelly time!!!
#include "U8glib.h"
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NO_ACK); // Display which does not send AC
int which = 0;
void draw(void) {
u8g.drawPixel(55,63);
u8g.drawPixel(54,63);
u8g.drawPixel(51,63);
u8g.drawPixel(52,63);
@AverageMarcus
AverageMarcus / IronMan.ino
Last active December 3, 2015 18:16
Iron Man
#include "U8glib.h"
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NO_ACK); // Display which does not send AC
int which = 0;
void draw(void) {
u8g.drawPixel(55,4);
u8g.drawPixel(56,4);
u8g.drawPixel(57,4);
u8g.drawPixel(58,4);
@AverageMarcus
AverageMarcus / SpaceInvader.ino
Last active August 29, 2015 14:16
Space Invader
#include "U8glib.h"
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NO_ACK); // Display which does not send AC
void draw(void) {
u8g.drawPixel(53,11);
u8g.drawPixel(54,11);
u8g.drawPixel(54,12);
u8g.drawPixel(53,12);
u8g.drawPixel(55,11);
u8g.drawPixel(55,12);
@AverageMarcus
AverageMarcus / ConwaysGameOfLife.html
Last active August 29, 2015 14:03
An example of Conway's Game of Life
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Marcus Noble - Conway's Game Of Life</title>
<style type="text/css">
* {
box-sizing:border;
}
body{