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
<?php | |
// This code is a serialised string fixer for WordPress (and probably other systems). | |
// Simply select the table you need to fix in $table, and the code will change the string lengths for you. Saves having to manually go through. | |
// Written 20090302 by David Coveney http://www.davecoveney.com and released under the WTFPL - ie, do what ever you want with the code, and I take no responsibility for it OK? | |
// To view the WTFPL go to http://sam.zoy.org/wtfpl/ (WARNING: it's a little rude, if you're sensitive) | |
// | |
// Thanks go to getmequick at gmail dot com who years ago posted up his preg_replace at http://uk2.php.net/unserialize and saved me trying to work it out. | |
// | |
// Before you start, do make a backup. A backup that you know works, because this code has the scope to really break your data if you're careless. |
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
/** | |
* Convert an array of SimpleXMLElement's into a | |
* collection. | |
* | |
* @param array $records | |
* | |
* @return \Illuminate\Support\Collection | |
* @access public | |
*/ | |
public function recordsToCollection($records) : \Illuminate\Support\Collection |
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
<template> | |
<div id="monitors"> | |
</div> | |
</template> | |
<script> | |
export default { | |
props: { | |
pings: [Object, Number], |
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
<template> | |
<div class="flex"> | |
<div class="w-full block md:inline-block md:w-1/2 md:pl-6 md:pr-8"> | |
<v-select v-model="monitorInput" :options="monitors" placeholder="Select Line" @input="monitorUpdated"></v-select> | |
</div> | |
<div class="w-full block md:inline-block md:w-1/2 md:pr-6 md:pl-8"> | |
<v-select v-model="rangeInput" :options="ranges" placeholder="Select Range" @input="rangeUpdated"></v-select> | |
</div> | |
</div> | |
</template> |
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
<template> | |
<div id="monitor-wrapper"> | |
<monitor-select v-on:monitor-updated="updateMonitor" v-on:range-updated="updateRange" :monitor-value="allOption"></monitor-select> | |
<div id="monitor-inner" class="p-6 text-center"> | |
<monitor :pings="pings" :range="range"></monitor> | |
</div> | |
</div> | |
</template> | |
<script> |
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
/** | |
* First we will load all of this project's JavaScript dependencies which | |
* includes Vue and other libraries. It is a great starting point when | |
* building robust, powerful web applications using Vue and Laravel. | |
*/ | |
require('./bootstrap'); | |
window.Vue = require('vue'); |
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
upstream websocket { | |
server 127.0.0.1:8443; | |
} | |
server { | |
root /var/www/html/subdomain.example.com/public; | |
index index.php index.html index.htm; | |
server_name subdomain.example.com; |
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
if($itemCount > 1) | |
{ | |
foreach($items as $item) | |
{ | |
if($item->getProduct()->getId() == $productId) | |
{ | |
$itemId = $item->getItemId(); | |
$cart->removeItem($itemId)->save(); | |
} | |
} |
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
if($itemCount > 1) | |
{ | |
$i = 0; | |
foreach($items as $item) | |
{ | |
$i++; | |
if($i == $itemCount) | |
{ | |
if($item->getProduct()->getId() == $productId) | |
{ |