Below you will find pages that utilize the taxonomy term “Development”
Go Language Setup for Multiple Projects
Update: It turns out that this setup is not needed, you should a have single GOPATH directory with all of your projects inside it, and use the vendor feature to handle each project dependencies. More details in a new post.
When working with Go language you must setup the GOPATH environment variable, but soon you will face two problems:
- Each project should have its own Go dependencies and its own Git code repo, so putting your source under GOPATH would be problematic.
- When working with “Atom” with “Go Plus” plugin, it needs to install several Go packages which would pollute your own source.
To solve both problems I added the following to my “.bash_login”:
Implementing Login/Logout in Django
Update: add names and namespace to URLs
Implementing user authentication is fairly easy job in Django, many functionalities are already included in the standard Django installation, you can manage users using the default “admin” app the comes with Django.
Here I will show how implement Login/Logout feature by relying on Django built-in views.
Source Code Management with GIT
I gave an introduction to Git in the last DevCamp meeting held on the 18h of April at Badir.
I hope you find it useful
My First Makefile
The following is a sample Makefile for simple project, here I am building a simple “Bloom Filter” library, and “main” program to use it.
The library will have the following files:
- hash.h and hash.c
- bloom.h and bloom.c
and we should get “libbloom.a” out of it.
The “main” program will use:
- main.c
- bloom.h
- libbloom.a
and we should get “main” executable. So our make file should look like this:
$ cat Makefile
CFLAGS=-Wall -O3
LDFLAGS= -L.
LDLIBS=-lbloom
CFLAGS += `pkg-config --cflags libpcre`
LDFLAGS += `pkg-config --libs libpcre`
OBJS=main.o other.o libbloom.a
BLOOM_OBJS=hash.o bloom.o
all: main libbloom.a
main: $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
libbloom.a: $(BLOOM_OBJS)
ar rcs $@ $^
.PHONY: clean
clean:
-rm main libbloom.a *.o
Makefile use TAB not spaces for indentation.