This file contains 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
var table = document.getElementsByClassName('advanced_dns')[0]; | |
var rows = table.getElementsByTagName('tr'); | |
var i, len, row; | |
var hostname, type, priority, ttl, destination; | |
var output = ''; | |
output += '$TTL 600\n'; // start with default TTL | |
// skip header and last two rows (add new entry, delete all entries) | |
for (i = 1, len = rows.length - 2; i < len; i++) { |
This file contains 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
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
kind: ClusterRoleBinding | |
metadata: | |
name: kubernetes-dashboard | |
labels: | |
k8s-app: kubernetes-dashboard | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: ClusterRole | |
name: cluster-admin |
This file contains 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
Code to change a request from / to /app1/ | |
reqirep ^([^\ :]*)\ /(.*) \1\ /app1/\2 | |
If urls in the response contain absolute urls it might be required to use this: | |
acl no_redir url_beg /app1/ | |
reqirep ^([^\ :]*)\ /(.*) \1\ /app1/\2 if !no_redir | |
The code makes sure that the method and url-path behind the / stays the same. Which method you need exactly might depend on the application thats running. | |
For readability of the above how change a request from /app1/ to /app1/app1redir/ | |
reqirep ^([^\ :]*)\ /app1/(.*) \1\ /app1/app1redir/\2 |
This file contains 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
# -*- encoding: utf-8 -*- | |
# -------------------------- | |
# Ripped from django project | |
# -------------------------- | |
from django.contrib.contenttypes.models import ContentType | |
from django.utils.translation import ugettext as _ | |
from django.utils.encoding import force_unicode |
This file contains 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
//EJ: 4 Relay Switch over WIFI using MQTT and Home Assistant with OTA Support | |
//EJ: The only way I know how to contribute to the HASS Community... you guys ROCK!!!!! | |
//EJ: Erick Joaquin :-) Australia | |
// Original sketch courtesy of ItKindaWorks | |
//ItKindaWorks - Creative Commons 2016 | |
//github.com/ItKindaWorks | |
// | |
//Requires PubSubClient found here: https://github.com/knolleary/pubsubclient | |
// |
This file contains 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
# best practice: linux | |
nano ~/.pgpass | |
*:5432:*:username:password | |
chmod 0600 ~/.pgpass | |
# best practice: windows | |
edit %APPDATA%\postgresql\pgpass.conf | |
*:5432:*:username:password | |
# linux |