Skip to content

Instantly share code, notes, and snippets.

View albertzak's full-sized avatar

Albert Zak albertzak

View GitHub Profile
@albertzak
albertzak / main.c
Created May 19, 2016 18:25
graph topology search
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_NODES 20
#define WHITE 0
#define GRAY 1
#define BLACK 2
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
struct _element {
char icao_code[5];
char station_name[100];
};
@albertzak
albertzak / main.c
Created May 13, 2016 06:52
boundedbuffer
/*****************************
* Fernlehre Bounded Buffer
* File: main.c
* Author: Granzer Wolfgang
* Version: 1.1
* Date: 05.05.2015
**/
#include <stdio.h>
#include <stdlib.h>
/* Algorithmen und Datenstrukturen Uebung 5 */
#include <stdio.h>
#include <stdlib.h>
// Globale Variablen und Typdefinitionen
typedef struct node_ {
int key;
#!/bin/bash
fail() {
echo "search: abort due to fatal error." 1>&2
exit 1
}
if [ ! -z $1 ] && [ "--help" == $1 ]; then
echo "V01.01 Vorname Nachname Personenkennzahl"
elif [ ! -z $1 ]; then
int run[] = { 0, 0 };
int turn = 0;
/**
* Function to enter critical section.
*/
void enterCriticalSection_dekker(int threadId)
{
run[threadId] = 1;
while ( run[1 - threadId] != 0 ) {
@albertzak
albertzak / wacom.md
Created November 11, 2015 18:19
Troubleshooting Wacom Driver Issues on OS X

Old Wacom Tablets <3 OS X Updates

Have you got an old Wacom Pen Tablet (Ex. Bamboo CTH-470) running on an old driver because the newer drivers don't support your old tablet? Are you running a recent OS X, and your mac won't boot after you update your system? Keep this in mind before you install your next OS X update.

Step 1: Remove Pen Tablet driver and preferences

This is important. Before you install any OS X updates, completely remove the Tablet driver and preferences from your system.

Step 1.1: Wacom Utility

@albertzak
albertzak / pre-commit
Created August 25, 2015 21:26
Prevent committing dev tags
#!/bin/sh
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=$(git hash-object -t tree /dev/null)
fi
Verifying that +albertzak is my openname (Bitcoin username). https://onename.com/albertzak
@albertzak
albertzak / Preferences.sublime-settings
Created December 7, 2014 05:09
Sublime Text Settings
{
"color_scheme": "Packages/Color Scheme - Default/Cobalt.tmTheme",
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
".meteor/local"
],