Skip to content

Instantly share code, notes, and snippets.

View bweston92's full-sized avatar
📝
go hardwork.Do(ctx, energySupplier, privRepo)

Bradley Weston bweston92

📝
go hardwork.Do(ctx, energySupplier, privRepo)
View GitHub Profile
@bweston92
bweston92 / indexes.go
Created September 4, 2018 14:17
MongoDB Golang Driver Ensure Index
package mgoutil
import (
"context"
"github.com/mongodb/mongo-go-driver/bson"
"github.com/mongodb/mongo-go-driver/mongo"
"github.com/pkg/errors"
)
@bweston92
bweston92 / main.c
Created September 1, 2017 20:34
Stack example in C.
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
typedef struct stack_item
{
// The value given to the item.
int value;
// The pointer to the previous item.
struct stack_item * prev;