Skip to content

Instantly share code, notes, and snippets.

View larrydevops's full-sized avatar

Larry DevOps larrydevops

View GitHub Profile
@larrydevops
larrydevops / php-style-guide.md
Created November 17, 2022 18:56 — forked from ryansechrest/php-style-guide.md
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
@larrydevops
larrydevops / git_cheat-sheet.md
Created November 8, 2022 17:22 — forked from davfre/git_cheat-sheet.md
git commandline cheat-sheet
@larrydevops
larrydevops / scp.md
Created August 22, 2021 22:47 — forked from michaelminter/scp.md
scp examples # command line, linux, mac

#Example syntax for Secure Copy (scp)

##What is Secure Copy?

scp allows files to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh.

###Examples

Copy the file "foobar.txt" from a remote host to the local host

@larrydevops
larrydevops / install_ubiquiti_unifi_controller_ubuntu_20.04.sh
Created August 15, 2021 00:36
How to install Ubiquiti Unifi Controller Software on Ubuntu 20.04
sudo apt update
sudo apt install apt-transport-https -y
echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg
sudo apt update
sudo apt install openjdk-8-jre-headless unifi -y
sudo systemctl status --no-pager --full mongodb.service unifi.service
@larrydevops
larrydevops / GasPricesWidget.js
Created November 2, 2020 10:57 — forked from ignacioribes/GasPricesWidget.js
A scriptable Gas Price Widget
const ethGasStationApiUrl = `https://ethgasstation.info/api/ethgasAPI.json`;
const req = new Request(ethGasStationApiUrl);
const res = await req.loadJSON();
if (config.runsInWidget) {
const widget = new ListWidget();
const title = widget.addText("Gas Prices");
title.textColor = Color.white();
title.textOpacity = 0.8;