Skip to content

Instantly share code, notes, and snippets.

View briandowns's full-sized avatar

Brian Downs briandowns

  • Phoenix, AZ
View GitHub Profile
@Burgestrand
Burgestrand / .gitignore
Created March 12, 2011 22:12
libspotify example creating a playlist and adding tracks to it
example
appkey.c
login.c
@KartikTalwar
KartikTalwar / tiny.c
Created July 12, 2012 04:37
Tiny-C Compiler
/* file: "tinyc.c" */
/* Copyright (C) 2001 by Marc Feeley, All Rights Reserved. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
* This is a compiler for the Tiny-C language. Tiny-C is a
@wsargent
wsargent / docker_cheat.md
Last active June 29, 2024 19:32
Docker cheat sheet
@mateor
mateor / b_tree.py
Created November 12, 2014 23:17
A simple B-Tree in Python that supports insert, search and print.
# coding=utf-8
"""
author = Mateor
PYTHON 3.3.5
"""
from __future__ import (nested_scopes, generators, division, absolute_import, with_statement,
print_function, unicode_literals)
@jpillora
jpillora / sshd.go
Last active June 16, 2025 14:55
Go SSH server complete example - Read more here https://blog.gopheracademy.com/go-and-ssh/
// A small SSH daemon providing bash sessions
//
// Server:
// cd my/new/dir/
// #generate server keypair
// ssh-keygen -t rsa
// go get -v .
// go run sshd.go
//
// Client:
@tanb
tanb / xhyve-freebsd-tutorial-1.md
Last active November 27, 2021 13:07
FreeBSD running on xhyve tutorial. (Appendix: Resize image with qemu. Create FreeBSD VM with qemu).

TL;DR

  • Create 5GB FreeBSD image.
  • Install FreeBSD on xhyve.
  • Mount host directory.

Requisites

@coboshm
coboshm / golang_kinesis.go
Created August 21, 2017 07:54
Golang + Kinesis firehose
package main
import (
"log"
"encoding/json"
"fmt"
"os"
"math/rand"
@tidwall
tidwall / build.sh
Last active May 26, 2018 20:04
Pass custom var strings to gcc
gcc -DgitSHA="$(git rev-parse HEAD)" main.c
@fay59
fay59 / Quirks of C.md
Last active July 8, 2025 19:54
Quirks of C

Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.

There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.

1. Combined type and variable/field declaration, inside a struct scope [https://godbolt.org/g/Rh94Go]

struct foo {
   struct bar {
 int x;