Skip to content

Instantly share code, notes, and snippets.

@eoboite
eoboite / ghost nginx config
Created July 27, 2021 13:44 — forked from deflume1/ghost nginx config
Sample Ghost NGINX config file
# map of content type -> expires header
map $sent_http_content_type $expires {
default off;
text/html epoch;
text/css max;
application/javascript max;
~image/ max;
}
# listen for BS traffic on 80 that lacks a hostname, and just serve
@eoboite
eoboite / KeyboardNotification.m
Last active August 29, 2015 14:26 — forked from braking/KeyboardNotification.m
Adjust content insets of a tableview when keyboard opens.
- (void)viewDidLoad
{
[super viewDidLoad];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWillShow:)
name:UIKeyboardWillShowNotification
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWillHide:)