apt install lm-sensors
open file
nano /usr/share/perl5/PVE/API2/Nodes.pm
# ------------------------------------------------ | |
# Config files are located in /etc/wireguard/wg0 | |
# ------------------------------------------------ | |
# ---------- Server Config ---------- | |
[Interface] | |
Address = 10.10.0.1/24 # IPV4 CIDR | |
Address = fd86:ea04:1111::1/64 # IPV6 CIDR | |
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started | |
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown |
getTimezoneString(): string { | |
// returns +xx:xx or -xx:xx | |
let offsetInMinutes = moment().local().utcOffset(); | |
let direction: number = (offsetInMinutes < 0 ? -1 : 1); | |
let hours: number = Math.floor(Math.abs(offsetInMinutes) / 60); | |
let minutes: number = Math.abs(offsetInMinutes) % 60; | |
return (direction < 0 ? "-" : "+") + (hours < 10 ? "0" + hours : hours) + ":" + (minutes < 10 ? (minutes == 0 ? "00" : "0" + minutes) : minutes); | |
} |
/** adjust tinymce - tags */ | |
add_filter('tiny_mce_before_init', 'tiny_mce_remove_unused_formats' ); | |
function tiny_mce_remove_unused_formats($init) { | |
// Add block format elements you want to show in dropdown | |
$init['block_formats'] = 'Paragraph=p;Heading 2=h2;Heading 3=h3;Pre=pre'; | |
return $init; | |
} |
<?php | |
//For Laravel 5.x users who are trying to perform a Model::update() call, to make it work you can use | |
Model::where('id', '1') | |
->update([ | |
'val' => $val, | |
'updated_at' => \DB::raw('updated_at') | |
]); |
<body> | |
<div id="loader"></div> | |
... | |
<script type="text/javascript"> | |
(function() { | |
document.getElementById("loader").remove(); | |
})(); | |
</script> |
### CUSTOM REDIRECT - ADD TRAILING SLASH IF MISSING | |
RewriteCond %{REQUEST_URI} (some-url-fragment)$ | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1/ [R=301,L] |
(function($){ | |
$.fn.shuffle = function() { | |
var allElems = this.get(), | |
getRandom = function(max) { | |
return Math.floor(Math.random() * max); | |
}, | |
shuffled = $.map(allElems, function(){ | |
var random = getRandom(allElems.length), |
A Pen by Captain Anonymous on CodePen.