Skip to content

Instantly share code, notes, and snippets.

View warmwaffles's full-sized avatar
🛠️
Code Wrestling

Matthew Johnston warmwaffles

🛠️
Code Wrestling
View GitHub Profile
@warmwaffles
warmwaffles / rbp.c
Last active December 30, 2016 04:10
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <tbx/types.h>
#include <rbp.h>
struct mat4f
gfx_camera_get_combined(struct gfx_camera* camera)
{
assert(camera);
struct mat4f ortho;
struct mat4f translation;
struct mat4f zoom;
float vw = camera->viewport.width;
# WM {{{
# Focus node
# If no window exist, target monitor/desktop instead
super + k
bspc node -f north || bspc monitor -f north
super + j
bspc node -f south || bspc monitor -f south
super + h
bspc node -f west || bspc monitor -f west || bspc desktop -f prev
# Remove exited docker containers
docker rm $(docker ps -q -f 'status=exited')
# Remove dangling containers
docker rmi $(docker images -q -f "dangling=true")
# remove dangling volumes
# http://stackoverflow.com/questions/30604846/docker-error-no-space-left-on-device
docker volume rm $(docker volume ls -qf dangling=true)
#pragma once
#include <stdlib.h>
template <typename T>
inline void assert_eq(T const& a, T const& b)
{
if (a != b) {
abort();
}
FROM nfnty/arch-mini
# This is a dockerfile meant for people who are trying to cross compile their C projects
# into windows binaries to ensure things actually compile correctly
RUN pacman -Syyu --noconfirm
RUN pacman -S --noconfirm git curl jshon expac yajl wget unzip cmake
RUN pacman -S --noconfirm --needed base-devel
RUN useradd -mg root ci

Note: the constants BI_RGB, BI_RLE8, and BI_RLE4 have the values 0, 1, and 2, respectively.

Graphics File Formats

This topic describes the graphics-file formats used by the Microsoft Windows operating system. Graphics files include bitmap files, icon-resource files, and cursor-resource files.

Bitmap-File Formats

#include <stdlib.h>
#include <stdarg.h>
#include <assert.h>
#include <logger.h>
bool logger_init(logger_t* logger, FILE* fd)
{
assert(logger);
assert(fd);
class Hash
def pile(key, *args)
if args.count < 2
self[key] = args[0]
else
self[key] ||= {}
self[key].pile(args.shift, *args)
end
end
end
---
Language: Cpp
BasedOnStyle: Mozilla
IndentWidth: 4
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlignAfterOpenBracket: Align
SpaceBeforeParens: ControlStatements
ColumnLimit: 100