This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# setup powerdns for remote | |
- hosts: apnscp | |
tasks: | |
- name: add powerdns submodule | |
shell: /bin/bash -ic 'git submodule add https://github.com/LithiumHosting/apnscp-powerdns.git resources/playbooks/addins/apnscp-powerdns' | |
args: | |
chdir: /usr/local/apnscp | |
- name: setup powerdns symlink |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# loop through server domains and check if they resolve | |
# and if their first nameserver matches one of our nameserver ip's | |
in_array() { | |
needle="$1" | |
shift | |
haystack=("$@") | |
for i in "${haystack[@]}"; do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function northwoods_events_shortcode($atts) { | |
$limit = 10; | |
if ($atts['limit']) { | |
$atts['limit'] = (int)$atts['limit']; | |
} | |
$args = array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php declare(strict_types=1); | |
use Opcenter\Dns\Record; | |
class Email_Module_Surrogate extends Email_Module | |
{ | |
public function get_records(string $domain, string $subdomain = ''): array | |
{ | |
$base = parent::get_records($domain, $subdomain); | |
// record to replace |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# apnscp php | |
- hosts: apnscp | |
tasks: | |
- name: set php-fpm to use by default with new accounts | |
shell: cpcmd scope:set apnscp.config httpd use_fpm true | |
- name: 01-imagick.ini check | |
file: | |
path: /home/virtual/FILESYSTEMTEMPLATE/siteinfo/etc/php72.d/01-imagick.ini |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# open firewall for remote access from select hosts | |
- hosts: localhost | |
gather_facts: no | |
tasks: | |
- name: Create redis firewall group | |
local_action: | |
module: vultr_firewall_group | |
name: redis | |
run_once: yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# good idea to add the new serers ip to csf.ignore on the old server so you dont get a notification for every login | |
# server you are syncing email from | |
old_server='cp2.oldserver.com' | |
# formatted to easily be copied and pasted from "Show Reseller Accounts" in WHM | |
test_accounts='user1 user1.com basic_plan | |
user2 user2.com basic_plan' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: master_bath_fan | |
platform: ESP8266 | |
board: esp01_1m | |
wifi: | |
ssid: "#######" | |
password: "#######" | |
# Enable fallback hotspot (captive portal) in case wifi connection fails |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
attribute: energy_percent_by_applicance | |
chart_type: doughnut | |
display_legend: false | |
entity: sensor.fpl_xxxxxxxxxx | |
legend_position: right | |
title: Power Distribution | |
type: 'custom:attribute-pie-chart-card' | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Support for the Fitbit API.""" | |
import datetime | |
import logging | |
import os | |
import time | |
from fitbit import Fitbit | |
from fitbit.api import FitbitOauth2Client | |
from oauthlib.oauth2.rfc6749.errors import MismatchingStateError, MissingTokenError | |
import voluptuous as vol |