Skip to content

Instantly share code, notes, and snippets.

View peterkc's full-sized avatar

Peter Chanthamynavong peterkc

View GitHub Profile
@mikestecker
mikestecker / optimising-unifi-performance.md
Last active April 22, 2024 13:32
optimising-unifi-performance

optimising-unifi-performance

NOTE: Content below is written by Adrian Mace. Click here for an updated version.

Below are the key settings that I apply on any unifi installation for optimal performance.

Settings

Settings > Site

  • Ensure Enable Advanced Features is enabled
    This allows you to follow along with the guide in it's entirety.
#!/bin/bash
set -u
##############################################################################
# DEPRECATION NOTE
#
# This script is outdated. Use it at your own risk.
# First, it has a bug related to the option -o (basically, it does nothing).
# Second, there is a new github repo with a new version, with no known bugs
# and with improved features:
@jbfriedrich
jbfriedrich / nsmb.conf
Last active June 24, 2024 11:22
macOS 11.2 NSMB configuration
# /etc/nsmb.conf - macOS 11.3 - 2021-04-29
#------------------------------------------------------------------------------
# SMB configuration for macOS 11.3 <-> Synology
#------------------------------------------------------------------------------
# Additional information:
# -----------------------
# https://support.apple.com/de-de/HT211927
# https://support.apple.com/en-us/HT208209
# https://apple.stackexchange.com/questions/309016/smb-share-deadlocks-since-high-sierra
# https://photographylife.com/afp-vs-nfs-vs-smb-performance
@mtibben
mtibben / bug-report.md
Last active April 30, 2018 20:52
Apple bug report 35065812: macOS High Sierra curl does not use certs in the keychain

In High Sierra, curl has switched from linking against SecureTransport, to use LibreSSL. However with this change, it seems that curl no longer recognises trusted certificates stored in the keychain.

# note that safari does not trust the site (expected)
$ open -a Safari https://self-signed.badssl.com/

# note that curl does not trust the site (expected)
$ curl https://self-signed.badssl.com
curl: (60) SSL certificate problem: self signed certificate

# trust the self-signed certificate by adding it to the keychain
@petermoresi
petermoresi / Makefile
Last active November 14, 2019 19:58
A Makefile for web developers using babel with webpack or browserify
# Makefile for web development with:
# 1. ES6 / Babel compiler
# setup: npm install babel
# 2. Bundler (Webpack or Browserify)
# setup: npm install webpack|browserify
# 3. Static Web Server
# setup: npm install http-server
WEBMAKE = webmake
WEBPACK = webpack
@sighingnow
sighingnow / Makefile
Last active June 28, 2024 16:20
Detect operating system in Makefile.
# Detect operating system in Makefile.
# Author: He Tao
# Date: 2015-05-30
OSFLAG :=
ifeq ($(OS),Windows_NT)
OSFLAG += -D WIN32
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
OSFLAG += -D AMD64
endif
@edwardbeckett
edwardbeckett / idea64.exe.vmoptions
Last active March 22, 2024 20:18
Java 8 Intellij 64 JVM Options
-server
-Xms2g
-Xmx2g
-Xss16m
-XX:+UseConcMarkSweepGC
-XX:+CMSParallelRemarkEnabled
-XX:ConcGCThreads=4
-XX:ReservedCodeCacheSize=128m
-XX:+AlwaysPreTouch
-XX:+TieredCompilation
@remy
remy / Makefile
Last active March 15, 2022 00:57
The Makefile I'm using to compile .less file changes *when* the changes occur. Full write up: https://remysharp.com/makefile
# when you run `make` alone, run the `css` rule (at the
# bottom of this makefile)
all: css
# .PHONY is a special command, that allows you not to
# require physical files as the target (allowing us to
# use the `all` rule as the default target).
.PHONY: all
# replace all .less files with .css extension and cache
@benoitboucart
benoitboucart / gist:8810514
Last active September 20, 2017 18:31
Limit the number of requests with batch requests in AngularJS
// Going mobile with Angular by Ari
// Limit & batch number of network requests
// Source: https://speakerdeck.com/auser/going-mobile-with-angular?utm_source=ng-newsletter&utm_campaign=b5794c7e19-AngularJS_Newsletter_2_4_142_3_2014&utm_medium=email&utm_term=0_fa61364f13-b5794c7e19-96511737
angular.module('myApp.services')
.factory('NetworkBatcher', function($http){
var service = {
promises: [],
addCall: function(obj){
var promise = $http(obj);
service.promises.push(promise);