Skip to content

Instantly share code, notes, and snippets.

Installation collectd, cgp, nginx, php7

Make available graphs using cgp on nginx with collectd.

Task Command
Install nginx: apt-get install nginx
Install php7: apt-get install php7.0-fpm
Set nginx.conf: server_tokens off;
gzip off;
Add collectd deb to sources: echo "deb xenial collectd-5.6" >> /etc/apt/sources.list
@Tampa
Tampa / check_inventory.php
Last active May 11, 2022 15:57
Inventory Check Script
<?php
// Database setup, edit as needed
$database_info = array();
$database_info['hostname'] = "localhost";
$database_info['database'] = "grid";
$database_info['username'] = "grid";
$database_info['password'] = "grid";
////////////////////////////////////////////////
@Tampa
Tampa / gist:97e4ab0db59379b6c7bf347bb8dcb83e
Last active December 19, 2024 05:56
Jenkins extra css
:root {
--primary: #ddd;
--text-color: #ddd;
--background: #222;
--light-grey: #444;
--very-light-grey: #555;
--table-body-foreground: #ddd;
--table-header-foreground: #ddd;
--tabs-item-background--selected: #000;
--link-color: #ddd;
@Tampa
Tampa / ossl-lsl.xml
Created November 18, 2022 01:28
LSL-OSSL User defined language for Notepad++
<NotepadPlus>
<UserLang name="ossl-lsl" ext="lsl" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00// 01 02 03/* 04*/</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2">0x</Keywords>
Subject: [PATCH] Stop paywalling things
---
server/configuration.go | 3 --
server/enterprise/license.go | 4 --
server/session.go | 26 +--------
server/session_test.go | 54 -------------------
server/telemetry.go | 37 +++----------
.../src/components/channel_header_button.tsx | 4 +-
webapp/src/selectors.ts | 2 -
@Tampa
Tampa / landtool.php
Created October 27, 2024 03:18
New landtool.php for php7.4 and up
<?php
$request_xml = file_get_contents("php://input");
function preflightBuyLandPrep($method_name, $params, $app_data)
{
$req = new SimpleXMLElement(file_get_contents("php://input"));
$amount = $req->params[0]->param[0]->value[0]->struct[0]->member[3]->value[0]->int;