Skip to content

Instantly share code, notes, and snippets.

View fbs's full-sized avatar
🦄

bas smit fbs

🦄
View GitHub Profile
@fbs
fbs / Makefile-0-0-1
Created January 14, 2011 18:43
A simple makefile
# TOOLS
CPP = g++
CC = gcc
# MORE TOOLS
SIZE = size
OBJCOPY = objcopy
OBJDUMP = objdump
#PROJECT RELATED STUFF
@fbs
fbs / main.c
Created February 10, 2011 15:58
void print_list(void)
{
int x;
for(x=0; x < (word_count);printf("Word %d is: %s\n",x,words[x++]))
;
}
extern printf
section .rodata ; data section
pstr: db "rax = %d",10,0 ; rax = %d\n\0
num: dq 5
section .text ; code section
global main ; make label available to linker
main: ; standard gcc entry point
/* * * * * * * * *
*
* Help routine for remove_word_from_tree
* this recursive function finds the 'alphabetically largest'
* word in (sub-)tree. This means: it returns a pointer
* to the word that has the largest value out of strcmp().
*
* * * * * * * * */
const char * // help routine for the above function
branch::get_largest_word(void) const
require 'prime'
require 'mathn'
Prime.each(600851475143/3) do |prime|
if ((600851475143%prime)) == 0
puts prime
end
end
@fbs
fbs / a.c
Created April 29, 2011 17:09
#include <stdio.h>
int main(void)
{
char buf[] = "string";
char * str = buf;
printf("hallo %x\n", (int)str);
return 0;
}
update_interval 2
total_run_times 0
net_avg_samples 1
cpu_avg_samples 1
imlib_cache_size 0
double_buffer yes
no_buffers yes
format_human_readable
background true
use_xft yes
NAME := tetris
CXX := g++
SIZE := size
DEBUGGER := ddd
DEBUGGERFLAGS :=
# Default target is debug
ifeq ($(TARGET),)
TARGET=debug
endif
@fbs
fbs / __init__.py
Last active December 17, 2015 11:09
from .yaml_reader import *
@fbs
fbs / README
Created June 30, 2013 18:19
Simple DE0 pwm - verilog
PWM on the DE0 board
The pll is left out. Its 50MHz in, 1MHz out, generated by quartus