Skip to content

Instantly share code, notes, and snippets.

View bbqchickenrobot's full-sized avatar

Troy bbqchickenrobot

View GitHub Profile
@Wesleysaur
Wesleysaur / bst.rs
Last active July 1, 2025 06:36
A very simple binary search tree in rust
use std::io;
#[derive(Debug)]
struct BSTNode {
value: i32,
left: Option<Box<BSTNode>>,
right: Option<Box<BSTNode>>
}
impl BSTNode {
@ButchersBoy
ButchersBoy / BloomFilter.cs
Created September 15, 2016 18:09 — forked from haneytron/BloomFilter.cs
A simple Bloom Filter implementation in C#
using System;
namespace BloomFilter
{
class Program
{
static void Main(string[] args)
{
AddItem("test");
AddItem("test2");
@haneytron
haneytron / BloomFilter.cs
Last active November 14, 2023 06:13
A simple Bloom Filter implementation in C#
using System;
namespace BloomFilter
{
class Program
{
static void Main(string[] args)
{
AddItem("test");
AddItem("test2");
@bbqchickenrobot
bbqchickenrobot / Nginx -> RethinkDB Admin
Last active May 3, 2016 23:57 — forked from jmdobry/Instructions.md
Nginx reverse-proxy for RethinkDB Admin UI
Start your rethinkdb instance with this flag:
`--bind all` (or `bind=all` in the configuration file for your instance)
Block external access to the web UI with these two commands:
`sudo iptables -A INPUT -i eth0 -p tcp --dport 8080 -j DROP`
`sudo iptables -I INPUT -i eth0 -s 127.0.0.1 -p tcp --dport 8080 -j ACCEPT`
Install nginx (if you haven't already):
`sudo apt-get install nginx`
@bretcope
bretcope / 1 - Map Arguments to Properties.cs
Last active March 12, 2019 05:33
Sigil Object Mapping - Basic Examples
// Runnable from Linqpad 5
// Must install the Sigil nuget package and include the Sigil namespace
void Main()
{
var createSample = GetMapperDelegate();
// try it out
createSample(23, "Hello").Dump();
}
@isaacabraham
isaacabraham / suave-on-service-fabric.fs
Last active January 6, 2017 15:04
Hosting Suave in Azure Service Fabric
open Microsoft.ServiceFabric.Services
open Suave
open Suave.Http.Successful
open Suave.Web
open System.Fabric
open System.Threading
open System.Threading.Tasks
type SuaveService() =
inherit StatelessService()
@adamchester
adamchester / suaveSerilog.fsx
Created June 8, 2015 11:15
A simple Suave to Serilog adapter
// Step 0. Boilerplate to get the paket.exe tool
open System
open System.IO
Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
if not (File.Exists "paket.exe") then
let url = "https://github.com/fsprojects/Paket/releases/download/0.31.5/paket.exe"
use wc = new Net.WebClient()
let tmp = Path.GetTempFileName()
@jgold6
jgold6 / App.cs
Last active December 11, 2017 21:31
Xamarin Forms Custom Map renderer to draw Polylines
using System;
using Xamarin.Forms;
using Xamarin.Forms.Maps;
namespace YourNameSpace
{
public class App : Application
{
public App()
{
@johnpolacek
johnpolacek / .gitconfig
Last active October 21, 2025 22:30
My current .gitconfig aliases
[alias]
recent = "!git for-each-ref --sort=-committerdate refs/heads/ --format='%(committerdate:short) %(refname:short)' | head -n 10"
co = checkout
cob = checkout -b
coo = !git fetch && git checkout
br = branch
brd = branch -d
brD = branch -D
merged = branch --merged
st = status
@panesofglass
panesofglass / MidFuncAsClass.cs
Last active February 18, 2016 15:42
Quick hack to adapt the current HttpMessageHandlerAdapter to the OWIN signatures
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using AppFunc = Func<IDictionary<string, obj>, Task>;
using MidFunc = Func<AppFunc, AppFunc>;
public class MidFuncType
{
private readonly AppFunc next;