This is a very simple HTTP server for Unix, using fork(). It's very easy to use
- include header
httpd.h
- write your route method, handling requests.
- call
serve_forever("12913")
to start serving on port 12913
# Last updated May, 2024 for Apple silicon Macs | |
# Install Homebrew if you don't already have it: https://brew.sh | |
# install nano from homebrew | |
brew install nano nanorc | |
# update your nanorc file | |
echo 'include "'"$(brew --cellar nano)"'/*/share/nano/*.nanorc"' >> ~/.nanorc | |
# close and re-open your terminal and you'll have syntax highlighting |
// based on and inspired by https://gist.github.com/1026439 and https://gist.github.com/3798781 | |
// | |
// MIT license. Use however you'd like. | |
// | |
// first, define our macro for delaying our transition: | |
#define PKWaitDelay(dly, block) dispatch_after(dispatch_time(DISPATCH_TIME_NOW,dly*100000),dispatch_get_current_queue(), ^{ block }) | |
// then, inside your AppDelegate.m in didFinishLaunchingWithOptions: | |
UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.window.frame]; |