Skip to content

Instantly share code, notes, and snippets.

@erenon
erenon / .fonts.conf
Created May 16, 2011 13:27
Fontconfig file - display sharp fonts in browsers
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
<edit mode="assign" name="hintstyle" >
<const>hintfull</const>
</edit>
</match>
@erenon
erenon / list.hpp
Created May 14, 2011 18:20
Custom simple list implementation
#ifndef LIST_H_
#define LIST_H_
#include <cstddef>
template <typename T>
class List {
struct item {
T value;
@erenon
erenon / find_memleak.h
Created May 6, 2011 17:42
find_memleak
#include <iostream>
#include <cstdlib>
#define new _NEW_WRAPPER() + new
using namespace std;
int _NEW_WRAPPER() {
cout << "hello" << endl;
return 0;
@erenon
erenon / digit check.sh
Created December 9, 2010 12:31
Checks the digit resoult
#!/bin/bash
wget http://home.mit.bme.hu/~laczko/digit_eredmenyek.pdf -N -q
if [ -e "digit_md5" ]; then
md5sum digit_md5 --status -c
if [ $? != 0 ]; then
echo "===FRISSÜLT==="
fi
else
@erenon
erenon / Makefile
Created December 6, 2010 19:24
Makefile
C_SRCS += \
./library.c \
./functions.c \
./konyvtar.c
OBJS += \
./library.o \
./functions.o \
./konyvtar.o
@erenon
erenon / mod.c
Created December 5, 2010 23:05 — forked from anonymous/mod.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define MAX_STRING_LENGTH 101
typedef struct {
char szerzo[101];
char cim[101];
unsigned kev;
char tema[101] ;
@erenon
erenon / mutantbtree.c
Created November 29, 2010 20:30
mutant and balanced binary tree
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct _btree {
int value;
struct _btree *left;
struct _btree *right;
} btree;
@erenon
erenon / listn.c
Created November 23, 2010 09:41
insert after n
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct _list {
int value;
struct _list *next;
} list;
@erenon
erenon / book.c
Created November 23, 2010 08:39
book list
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct _book {
char author[50];
int page;
int is_sentinel;
struct _book *next;
@erenon
erenon / pggyak-kzh-2.c
Created November 8, 2010 22:12
pggyak-kzh-2.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char *trim(char *str) {
int i=0, spbefore=0, slen=0, spafter=0;
char *newstr;
slen = strlen(str);