Skip to content

Instantly share code, notes, and snippets.

View mikestecker's full-sized avatar

Mike Stecker mikestecker

  • Menifee, CA
  • 23:06 (UTC -07:00)
View GitHub Profile
@mikestecker
mikestecker / optimising-unifi-performance.md
Last active February 18, 2024 18:35
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.

Keybase proof

I hereby claim:

  • I am mikestecker on github.
  • I am mikestecker (https://keybase.io/mikestecker) on keybase.
  • I have a public key ASDJw_o_pQnI9x-y4k011cQJrHGO2vM7zYQVwNe9QFcbuwo

To claim this, I am signing this object:

{% macro truncate(text, limit, append) %}
{# settings #}
{% set suffix = append|default('...') %}
{% set punctuation = ['.',',','-',':',';'] %}
{# logic #}
{% set array = text|split(' ') %}
{% set arrayTruncated = array|slice(0, limit) %}
{% set string = arrayTruncated|join(' ') %}
{% if limit and array|length > limit %}
{% for mark in punctuation %}
@mikestecker
mikestecker / server-setup.sh
Last active May 9, 2023 17:49
Bash script for my server setup with Digital Ocean, Server Pilot with Node, Gulp and Craft
For Buddy to be able to update NGINX and run other commands as root, you need to follow these steps to give the user buddy access.
If no user has been created, follow the guide here to create a user for Buddy:
https://www.digitalocean.com/community/tutorials/how-to-add-and-delete-users-on-ubuntu-16-04
1. On ubuntu based systems, run " $ sudo visudo "
2. this will open /etc/sudoers file.
3. If your buddy user is already in that file, then modify to look like this:
buddy ALL=(ALL) NOPASSWD: ALL
@mikestecker
mikestecker / vue.twig
Created September 26, 2016 21:17 — forked from mmikkel/vue.twig
Vue.js Craft template
{% includeJsFile('https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.26/vue.js') %}
{% set script %}
Vue.config.debug = true;
Vue.config.delimiters = ['${', '}'];
new Vue({
el: '#content',
data: {
message: 'Hello Vue.js!'

Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

This is where any fun you might have been having ends. Now it’s time to get serious and talk about rules.

Writing CSS is hard. Even if you know all the intricacies of position and float and overflow and z-index, it’s easy to end up with spaghetti code where you need inline styles, !important rules, unused cruft, and general confusion. This guide provides some architecture for writing CSS so it stays clean and ma

// Block Grid
// Technique adapted from Foundation 5 for Bootstrap 3.
// https://github.com/zurb/foundation/blob/f755d8704123f86c281ede0b171881e2672f150d/scss/foundation/components/_block-grid.scss
// Original LESS Version by Christopher Mitchell (https://gist.github.com/ChrisTM)
// Converted to SCSS by Rasmus Jürs (https://github.com/Jursdotme)
[class*="block-grid-"] {
display: block;
margin: -($grid-gutter-width/2);
padding: 0;
@mikestecker
mikestecker / gist:792bce5f9ec4d925e7dd
Last active August 29, 2015 14:05
Fix for 'Call to undefined method Cp::set_variable()' in Channel Search
In 'channel_search/mcp.channel_search.php' replace line 102 which is:
$this->EE->cp->set_variable('cp_page_title', lang('channel_search_module_name'));
With this:
if ( version_compare( APP_VER, '2.6.0', '<' ) ) {
ee()->cp->set_variable('cp_page_title', lang('channel_search_module_name'));
} else {
ee()->view->cp_page_title = lang('channel_search_module_name');

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser

@mikestecker
mikestecker / lamp-setup.md
Last active July 30, 2018 20:10
This guide shows howto install Apache HTTP Server (httpd) with PHP 5.5.9 and following modules on Fedora 20/19/18/17, CentOS 6.5/6.4/6.3/6.2/6.1/6/5.10 and Red Hat (RHEL) 6.5/6.4/6.3/6.2/6.1/6/5.10 systems.

Install Apache/PHP 5.5.9 on Fedora 20/19, CentOS/RHEL 6.5/5.10

This guide shows howto install Apache HTTP Server (httpd) with PHP 5.5.9 and following modules on Fedora 20/19/18/17, CentOS 6.5/6.4/6.3/6.2/6.1/6/5.10 and Red Hat (RHEL) 6.5/6.4/6.3/6.2/6.1/6/5.10 systems.

  1. Change root user

su -
## OR ##

sudo -i