Skip to content

Instantly share code, notes, and snippets.

@hermanbanken
hermanbanken / Dockerfile
Last active April 22, 2024 10:53
Compiling NGINX module as dynamic module for use in docker
FROM nginx:alpine AS builder
# nginx:alpine contains NGINX_VERSION environment variable, like so:
# ENV NGINX_VERSION 1.15.0
# Our NCHAN version
ENV NCHAN_VERSION 1.1.15
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
@longle255
longle255 / ngrok-selfhosting-setup.md
Last active February 14, 2019 10:52 — forked from lyoshenka/ngrok-selfhosting-setup.md
How to setup Ngrok with a self-signed SSL cert

Intro

The plan is to create a pair of executables (ngrok and ngrokd) that are connected with a self-signed SSL cert. Since the client and server executables are paired, you won't be able to use any other ngrok to connect to this ngrokd, and vice versa.

DNS

Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is domain.com, you'll need a record for that and for *.domain.com.

Different Operating Systems

@rsattar
rsattar / SafariViewControllerAutlogin.m
Created September 15, 2015 21:15
SFSafariViewController autologin snippets
// Say this is in your app delegate
- (void) attemptAutologin
{
NSURL *autologinURL = ...some..url..that..does..autologin..on..your..server
self.safariViewController = [[SFSafariViewController alloc] initWithURL:autologinURL];
self.safariViewController.modalPresentationStyle = UIModalPresentationOverFullScreen;
self.safariViewController.view.alpha = 0.0;
[self.window.rootViewController presentViewController:self.safariViewController
animated:NO