- 2 c flour
- 1 c sugar
- 1 1/2 tsp baking powder
- 1/2 tsp baking soda
- 1/4 tsp salt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Quick Reference for SDL2 | |
======================== | |
Includes both prototypes and short examples of using the call. | |
int SDL_Init(Uint32 flags) | |
SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO); | |
void SDL_Quit(void) | |
atexit(SDL_Quit); | |
const char* SDL_GetHint(const char* name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* base.c : command-line utility to convert numbers to different formats. | |
* March 10, 2016 - PUBLIC DOMAIN */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <limits.h> | |
int main(int argc, char **argv) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* vm.h - virtual machine */ | |
#ifndef VM_H | |
#define VM_H | |
/* Goals: | |
* - no allocations in library | |
* - multithread safe | |
* - easy opcode extensions | |
* - single file | |
*/ | |
#include <stddef.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _XOPEN_SOURCE 700 | |
#define _POSIX_C_SOURCE 200809L | |
#include <stdio.h> | |
#include <unistd.h> | |
int main() { | |
int s, fd[2]; | |
pipe(fd); | |
if (!fork()) { /* child */ | |
dup2(fd[0], STDIN_FILENO); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Default options | |
CFLAGS = -Wall -W -g -O | |
# CFLAGS += -D_GNU_SOURCE | |
# OS Detection | |
ifeq ($(OS),Windows_NT) | |
X=.exe | |
RM=del | |
else | |
X= | |
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all :: | |
clean :: ; $(RM) $(TARGETS) $(foreach t,$(TARGETS),$(OBJS_$t)) | |
.PHONY : all clean | |
## Configuration | |
CFLAGS = -Wall -W -O2 -g | |
# a really aggressive strip-all for ARM | |
STRIP = strip -s -w -R .comment\* -R .note\* -R .gnu.hash -R .ARM.exidx -R .ARM.attributes | |
## Rules | |
%.o : %.c | |
$(COMPILE.c) $(if $(PKGS),$(shell pkg-config --cflags $(PKGS))) $(OUTPUT_OPTION) $< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this snippet to your .bashrc instead of your normal prompt (PS1) setting. | |
# Customize the line below further with your favorite smilies | |
# 😎 🙂 😊 😢 🙁 🙃 | |
PS1='$(test $? -eq 0 && echo "\[\033[0;32m\]😎" || echo "\[\033[0;1;31m\]😢")\[\033[0m\] \W\$ ' | |
# Set window title | |
case "$TERM" in | |
xterm*) | |
# see also man xterm(1) - "Window and Icon Titles" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
void | |
process(const char *input) | |
{ | |
const char delim[] = { 0x0b, 0x1c, 0x0d, 0 }; | |
int count = 0; | |
while (input[0] != '\0') { |
- Install Android Studio
- https://developer.android.com/studio/
- TODO: describe how to install NDK packages.
- TODO: describe how to check that NDK 21 is installed.
- Get SDL sources SDL2-2.0.12.tar.gz and extract to a location of your choice
cd /tmp