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).
<?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 != '') | |
{ |
<?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).
find /etc|xargs -n 1 stat -c "chown %U.%G %n;" |
<dashboard class="dashboard"> | |
<dashboard-header title="Teb-2 DataCenter"> | |
<dashboard-clock digital="true" binary="true" /> | |
</dashboard-header> | |
<server-list> | |
<server v-for="(server, index) in servers" :class="{ 'has-failed': !server.status }" :type="server.type" @click.native="updateServerStatus(index)"> | |
<span slot="name" class="data">{{server.name}}</span> | |
<span slot="status" class="data signal">{{server.status ? 'ONLINE' : 'OFFLINE'}}</span> | |
<span slot="adr" class="data">{{server.adr}}</span> | |
</server> |