Takes the edge off those boring customer feedback forms :) Grab the smilies and move them up or down to reflect how happy you are!!
Forked from Jamie Coulter's Pen Interactive Customer Feedback Form (For a pet store).
#!/bin/bash | |
# mytop.sh - (Monitor mysql process list with top like screen updates and adiditonal stats like cpu/io usage) | |
# | |
# Sample Output: | |
# | |
# CPU Usage 3.29% user 1.60% system 3.37% io wait 0.00% steal 91.59% idle | |
# Up 17 days 10 hours Load Avg 0.43 0.36 0.35 Processes 1(running) 408(total) Last PID 17825 | |
# +----------+------+-----------+----+---------+------+-------+------------------+ | |
# | Id | User | Host | db | Command | Time | State | Info | | |
# +----------+------+-----------+----+---------+------+-------+------------------+ |
<?php | |
$files = explode(' ', './scripts/map_sql_to_api.php ./scripts/whmcs_import.php ./scripts/map_everything_to_my.php ./scripts/whmcs_import2.php ./phpunit/class_tests/db_mdb2Test.php ./phpunit/class_tests/db_PDOTest.php ./phpunit/class_tests/db_mysqlTest.php ./phpunit/class_tests/db_mysqliTest.php ./include/preconfig.functions.inc.php ./include/accounts/accounts.inc.php ./include/dns/pdns.functions.inc.php ./include/db/class.db_mdb2.functions.inc.php ./include/functions.inc.php ./monitord.php ./monitord_new.php'); | |
foreach ($files as $file) | |
{ | |
echo "Working on file $file\n"; | |
$txt = file_get_contents($file); | |
$regex = '/([\s]+)(\$[\w\[\]\'_]+) = new db;\n[\s]+\$[\w\[\]\'_]+->Host = ([^;]+);\n[\s]+\$[\w\[\]\'_]+->Database = ([^;]+);\n[\s]+\$[\w\[\]\'_]+->User = ([^;]+);\n[\s]+\$[\w\[\]\'_]+->Password = ([^;]+);\n[\s]+\$[\w\[\]\'_]+->Type = ([^;]+);/m'; | |
if (preg_match($regex, $txt)) | |
{ | |
$txt = preg_replace($regex, '\1\2 = new db(\4, \5, \6, \3);\1\2->Type = \ |
<!-- | |
12 Dec 2013: | |
Plunker went down, got unstable, and the embedded preview failed. | |
So I'm putting up the same demo here temporarily. | |
Unfortunate that CodePen cannot have multiple files, so code here looks a bit messy, | |
not that I intend it to be, but putting this up is priority. | |
I'll clean this up when I have time... | |
--> |
<?php | |
function is_url($text) | |
{ | |
if (preg_match('/((?P<protocol>[a-z]{3,6}):\/\/)?((?P<userpass>[a-z]+:[a-z]+|[a-z]+)@)?(?P<hostname>[a-z0-9.-]+\.[a-z]{2,6})(:(?P<port>[0-9]+))?(?P<path>\/.)?/i', $text, $matches)) | |
{ | |
$ret = array(); | |
foreach ($matches as $key => $value) | |
{ | |
if (!is_numeric($key) && $value != '') | |
{ |
#!/bin/bash | |
# CPU Usage Totals Per VPS Per CPU/Core | |
# Written by Joe Huss <[email protected]> | |
# - This is just way better than anything else out there for gathering this info | |
# Screenshots of it here: | |
# http://forum.interserver.net/forum/threads/script-get-openvz-cpu-usage-totals-per-vps-per-cpu-core.4859/ | |
IFS=" | |
"; | |
debug=0; | |
if [ -e ~/.cpu_usage.last.sh ]; then |
<?php | |
/** | |
* xml2array() will convert the given XML text to an array in the XML structure. | |
* Link: http://www.bin-co.com/php/scripts/xml2array/ | |
* Arguments : $contents - The XML text | |
* $get_attributes - 1 or 0. If this is 1 the function will get the attributes as well as the tag values - this results in a different array structure in the return value. | |
* $priority - Can be 'tag' or 'attribute'. This will change the way the resulting array sturcture. For 'tag', the tags are given more importance. | |
* Return: The parsed XML in an array form. Use print_r() to see the resulting array structure. | |
* Examples: $array = xml2array(file_get_contents('feed.xml')); | |
* $array = xml2array(file_get_contents('feed.xml', 1, 'attribute')); |
rpmdir="$(grep "^%_topdir" /usr/lib/rpm/macros | sed -e s#"^.*%{getenv:HOME}"#"${HOME}"#g -e s#"^.*%{_usrsrc}"#"/usr/src"#g)"; |
Vagrant.configure(2) do |config| | |
config.vm.provider "virtualbox" do |vb| | |
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] | |
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"] | |
vb.customize ["modifyvm", :id, "--nictype1", "virtio"] | |
end | |
end |
Changelogs | |
August 2015 ( 131 commits ) | |
r6802 to 6933 | |
Device Support | |
Added support for DDN SFA devices | |
Added support for user/device license graphs for Mitel devices | |
Added support for Rittal CMC devices including water flow rate sensors | |
Added support for failover status sensors on Cisco ASAs | |
Added support for Netgear ReadyDATA OS temperature and fanspeed sensors from READYDATAOS-MIB | |
Added support for Netgear ReadyNAS temperature and fanspeed sensors from READNAS-MIB |
Takes the edge off those boring customer feedback forms :) Grab the smilies and move them up or down to reflect how happy you are!!
Forked from Jamie Coulter's Pen Interactive Customer Feedback Form (For a pet store).