Skip to content

Instantly share code, notes, and snippets.

Avatar

realmiketalbot

  • Emmons & Olivier Resources, Inc.
  • St. Paul, MN
View GitHub Profile
@vidia
vidia / nginx-unificontroller.conf
Last active May 4, 2021
Example, working, NGINX config for proxying to Unifi Controller software and using letsencrypt. Includes websocket fix.
View nginx-unificontroller.conf
# I had a bit of trouble getting my unifi controller (hosted offsite) to use a proxy/letsencrypt. So here are the fruits of my labor.
# The unifi default port is 8443 running on localhost.
# License: CC0 (Public Domain)
server {
# SSL configuration
#
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
@welkerc
welkerc / import.php
Created Aug 1, 2014
A csv import for postgresql using php.
View import.php
<?php
include("include.php");
ini_set("auto_detect_line_endings", true);
$dir = '/path_to/folder/';
$files = scandir ( $dir, 1 );
foreach ($files as $value) {
if(strlen ($value) > 2 ){
$end_pos = strpos ( $value, "." );
$f = substr ( $value, 0, $end_pos );
$fname = $f;
@pitch-gist
pitch-gist / gist:2999707
Created Jun 26, 2012
HTML: Simple Maintenance Page
View gist:2999707
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>