Skip to content

Instantly share code, notes, and snippets.

@hth
hth / nginx.conf
Created October 25, 2017 21:19 — forked from kmjones1979/nginx.conf
Example NGINX configuration to route based on country code using GeoIP
# load dynamic modules
load_module /etc/nginx/modules/ngx_http_geoip_module.so;
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
events { worker_connections 1024; }
http {
//
// ImagePicker.swift
// manueGE
//
// Created by Manuel García-Estañ on 7/11/16.
// Copyright © 2016 ManueGE. All rights reserved.
//
import Foundation
import UIKit
@hth
hth / nginx.conf
Created October 31, 2016 21:29 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
public class CountingFileRequestBody extends RequestBody {
private static final int SEGMENT_SIZE = 2048; // okio.Segment.SIZE
private final File file;
private final ProgressListener listener;
private final String contentType;
public CountingFileRequestBody(File file, String contentType, ProgressListener listener) {
this.file = file;
$('#calendar').fullCalendar({
viewRender: function(currentView){
var minDate = moment(),
maxDate = moment().add(2,'weeks');
// Past
if (minDate >= currentView.start && minDate <= currentView.end) {
$(".fc-prev-button").prop('disabled', true);
$(".fc-prev-button").addClass('fc-state-disabled');
}
else {
<context:annotation-config />
<context:component-scan base-package="org.example.web" />
<mvc:annotation-driven />
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.apache.activemq</string>
<key>WorkingDirectory</key>
<string>/usr/local/Cellar/activemq/5.5.1/libexec</string>