In Git you can add a submodule to a repository. This is basically a sub-repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:
- Separate big codebases into multiple repositories.
| #include <stdio.h> | |
| static int SEED = 0; | |
| static int hash[] = {208,34,231,213,32,248,233,56,161,78,24,140,71,48,140,254,245,255,247,247,40, | |
| 185,248,251,245,28,124,204,204,76,36,1,107,28,234,163,202,224,245,128,167,204, | |
| 9,92,217,54,239,174,173,102,193,189,190,121,100,108,167,44,43,77,180,204,8,81, | |
| 70,223,11,38,24,254,210,210,177,32,81,195,243,125,8,169,112,32,97,53,195,13, | |
| 203,9,47,104,125,117,114,124,165,203,181,235,193,206,70,180,174,0,167,181,41, | |
| 164,30,116,127,198,245,146,87,224,149,206,57,4,192,210,65,210,129,240,178,105, |
| /* | |
| To test that the Linux framebuffer is set up correctly, and that the device permissions | |
| are correct, use the program below which opens the frame buffer and draws a gradient- | |
| filled red square: | |
| retrieved from: | |
| Testing the Linux Framebuffer for Qtopia Core (qt4-x11-4.2.2) | |
| http://cep.xor.aps.anl.gov/software/qt4-x11-4.2.2/qtopiacore-testingframebuffer.html | |
| */ |
| #include "SDL.h" | |
| /* | |
| Compilation: | |
| ============ | |
| gcc -g --std=c99 -o sdl2_stbtt sdl2_stbtt.c `sdl2-config --cflags --libs` -lm | |
| Usage: | |
| ====== | |
| ./sdl2_stbtt /usr/share/fonts/TTF/LiberationMono-Regular.ttf |
| CRYSTAL = crystal | |
| UNAME = "$(shell uname -ms)" | |
| LIBRARY_PATH = $(shell brew --prefix crystal-lang)/embedded/lib | |
| LIBS = -levent -lpcl -lpcre -lgc -lpthread | |
| LDFLAGS = -Wl,-undefined,dynamic_lookup | |
| TARGET = crystal_example_ext.bundle | |
| $(TARGET): crystal_example_ext.o | |
| $(CC) -bundle -L$(LIBRARY_PATH) -o $@ $^ $(LIBS) $(LDFLAGS) |
| import Foundation | |
| import PlaygroundSupport | |
| /// A thread-safe array. | |
| public class SynchronizedArray<Element> { | |
| private let queue = DispatchQueue(label: "io.zamzam.ZamzamKit.SynchronizedArray", attributes: .concurrent) | |
| private var array = [Element]() | |
| public init() { } | |
| import Foundation | |
| protocol Channel: IteratorProtocol { | |
| func send(_ value: Element?) | |
| } | |
| /// A blocking channel for sending values. | |
| /// | |
| /// `send` and `receive` must run in separate separate execution contexts, otherwise you get a deadlock. | |
| final class BlockingChannel<A>: Channel { |
| # | |
| # This is a simple rackup file for geminabox. It allows simple role-based authorization. | |
| # | |
| # roles: | |
| # - developer | |
| # - upload | |
| # - delete | |
| # - admin (can do anything) | |
| # | |
| # For example, a developer who can access the service and upload new gems would have the following roles: `%w(developer upload) |