Skip to content

Instantly share code, notes, and snippets.

Avatar
📝
go hardwork.Do(ctx, energySupplier, privRepo)

Bradley Weston bweston92

📝
go hardwork.Do(ctx, energySupplier, privRepo)
View GitHub Profile
@bweston92
bweston92 / indexes.go
Created Sep 4, 2018
MongoDB Golang Driver Ensure Index
View indexes.go
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 Sep 1, 2017
Stack example in C.
View main.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;
You can’t perform that action at this time.