Skip to content

Instantly share code, notes, and snippets.

public function handle()
{
try {
$users = [];
$userEmail = [];
$userProfile = [];
$usersConfig = [];
$usersGroup = [];
$usersRole = [];
$usersCharge = [];
/**
* @param string $from
* @param array $to
* @return array
*/
public function getPrice(string $from, array $to): array
{
$client = new \GuzzleHttp\Client();
$apiKey = '14ab034e2562f97fdd7d68216324a10d8dedc3631c29a118885fa85474eb8a8b';
$url = 'https://min-api.cryptocompare.com/data/price?fsym=' . $from . '&tsyms=' . implode(',', $to) . '&api_key=' . $apiKey;
$arrRoutesRoles = [];
$routes = \Route::getRoutes();
foreach ($routes as $route) {
/** @var \Illuminate\Routing\Route $route */
if ($route->getName() && $route->getAction()['namespace'] === 'App\Http\Controllers') {
$name = '';
$arrName = explode('.', $route->getName());
if (count($arrName) > 1) {
$prefix = array_shift($arrName);
if ($prefix === 'auth') {
function task(str){
return str.replace(/\t/g, "-").replace(/ /g,"-").toLowerCase();
}
(function (e, i = 0) {
const geoIpServices = [
'https://api.2ip.ua/geo.json?ip=',
'http://api.sypexgeo.net/json',
'http://ip-api.com/json',
'http://api.db-ip.com/v2/free/self'
// 'https://ipinfo.io', //jsonp
// 'https://tools.keycdn.com/geo.json?host=',
];
public function start()
{
$file = file('../storage/app/files/data.txt');
foreach ($file as $key => $item) {
if (is_numeric($item[0])) {
echo $item . "<br>";
} else {
$sql = "INSERT INTO letter (Id_row, Value_row) values({$key}, {$item})";
echo $sql . "<br>";
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test Map</title>
</head>
<body>
<script type="text/javascript">
function prov(){
var array_word = [];
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test Map</title>
</head>
<body>
<script type="text/javascript">
function test(val,id){
<?php
/*
Plugin Name: Spelling
Description: Spelling Testing
Version: 1.0
Author: D_Andreevich
Author URI: local.host
Plugin URI: local.host/spelling_test
*/
?>
public function sendMarker(){
$km = 1000;
$order2 = Order::all();
// Start XML file, echo parent node
echo '<markers>';
// Iterate through the rows, printing XML nodes for each
foreach ($order2 as $latlng){
$lat = $latlng->coordinate_a->getLat(); // 40.7484404
$lng = $latlng->coordinate_a->getLng(); // -73.9878441