Headless Livewire, video tracker demo


https://laracasts.com/series/guest-spotlight/episodes/10

download file with save as

// Siehe Software-Muhasib FileReadUtils.ts (batch details)
var byte = this.base64ToArrayBuffer(attachment.data);
var file = new Blob([byte], {type: 'application/pdf'});

var a = document.createElement("a"),
  url = URL.createObjectURL(file);
a.href = url;
a.download = "batch_details.pdf";
document.body.appendChild(a);
a.click();
setTimeout(function() {
  document.body.removeChild(a);
  window.URL.revokeObjectURL(url);
}, 0);

CA$H 4 CARS

.cashforcars{
  position: fixed;
  bottom: 0px;
  left: 20px;
  width: 150px;
  height: 150px;
  z-index: 9;
}

how to build react native apps

# how to generate beta builds

## IOS Release

1) open project root on terminal and run this command 

```bash 
npx react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios
```

2) open xcode with the command 

```bash
xed ios
```

3) on xcode navigate to 
> product > Scheme > Edit Schem...

4) select the tab __Run__ and on build configuration select __Release__

> Now you have a stand-alone Xcode project and ready to build/release like native Xcode project.

5) open xcode __preferences__ > __Accounts__ und login with your apple developer account

6) on xcode near the __run__ icon on top instead of a specific device ( e.g ) select **Generic ios device**

7) select __product__ > __archive__ und wait until the build process finishes

8) En extra windows should open after build completed and within select __distribute App__ > select  __developement__ 

9) on __App thining__ dropdown select __all compatible devices__ and then 

set project custom local domain

symfony proxy:domain:attach $domain-name

create-user command

<?php
// src/Command/CreateUserCommand.php
namespace App\Command;

use App\Entity\User;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\Question;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;

class CreateUserCommand extends Command
{
    /**
     * @var EntityManagerInterface
     */
    private $manager;
    /**
     * @var UserPasswordEncoderInterface
     */
    private $encoder;

    public function __construct(EntityManagerInterface $manager, UserPasswordEncoderInterface $encoder)
    {
        $this->manager = $manager;
        $this->encoder = $encoder;
        parent::__construct();
    }

    // the name of the command (the part after "bin/console")
    protected static $defaultName = 'app:create-user';

    /**
    

Code match import for datev no matches

Inserts into the code matcher all the new bad_code entries. Ignores keys that vuilate unique constraint.
insert into 
	code_match
	(
		bad_code,
		key_param,
		origin,
		context,
		date_created
-- 		origin_id
	)
select
	bad_code,
	key_param,
	origin,
	context::jsonb,
	date_created
from (
select 
	min("5") bad_code,
	'catalog_no' key_param,
	'rom' origin,
	min(json_build_object (
		'description', "3"
	)::text) as context,
	NOW() date_created
from (
select
	"0",
	"1",
	"2",
	"3",
	"4",
	"5",
	"6",
	"7",
	"8",
	"9",
	"10",
	coalesce(good_code, catalogno) cost_id,
	good_code
from rom_costs
left join catalognew
on catalognew.catalogno = rom_costs."5"
	or catalognew.identifier = rom_costs."5"
left join code_match
on code_match.bad_code = rom_costs."5"
where coalesce(good_code, catalogno) is null
) as t
group by "5"
) as q 
ON CONFLICT DO NOTHING ;

sequelize v6

    const model = require(path.join(__dirname, file))(sequelize, Sequelize.DataTypes);

Crop and center

.img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;

  &-container {
      display: block;
      position: relative;
      overflow: hidden;
      width: 100%;
      height: 200px;
  }
}

new Dashboard

BA - Jagadhis Raghav 

Get browser timezone

const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;

getUserIP ip address

function getUserIP() {
	// check for shared internet/ISP IP
	if (!empty($_SERVER['HTTP_CLIENT_IP']) && validate_ip($_SERVER['HTTP_CLIENT_IP'])) {
		return $_SERVER['HTTP_CLIENT_IP'];
	}

	// check for IPs passing through proxies
	if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
		// check if multiple ips exist in var
		if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) {
			$iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
			foreach ($iplist as $ip) {
				if (validate_ip($ip))
					return $ip;
			}
		} else {
			if (validate_ip($_SERVER['HTTP_X_FORWARDED_FOR']))
				return $_SERVER['HTTP_X_FORWARDED_FOR'];
		}
	}
	if (!empty($_SERVER['HTTP_X_FORWARDED']) && validate_ip($_SERVER['HTTP_X_FORWARDED']))
		return $_SERVER['HTTP_X_FORWARDED'];
	if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && validate_ip($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))
		return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
	if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && validate_ip($_SERVER['HTTP_FORWARDED

JS wait for Shiny to initialize

$(document).on("shiny:sessioninitialized", function() {

});

Find in PDF

{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"find in pdf.ipynb","provenance":[],"authorship_tag":"ABX9TyMHkl0wNksJBQSCWG+kw2g/"},"kernelspec":{"name":"python3","display_name":"Python 3"}},"cells":[{"cell_type":"code","metadata":{"id":"H9xprqEkwv-x","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":293},"executionInfo":{"status":"ok","timestamp":1600089530819,"user_tz":-120,"elapsed":4683,"user":{"displayName":"Roman Žydyk","photoUrl":"https://lh4.googleusercontent.com/-VSzOJiZXdak/AAAAAAAAAAI/AAAAAAAAA-E/DhO-mo3MJmg/s64/photo.jpg","userId":"17506404909202592562"}},"outputId":"3d6892a6-b434-48e5-c638-d0a7588f2e80"},"source":["!pip install tika"],"execution_count":8,"outputs":[{"output_type":"stream","text":["Collecting tika\n","  Downloading https://files.pythonhosted.org/packages/96/07/244fbb9c74c0de8a3745cc9f3f496077a29f6418c7cbd90d68fd799574cb/tika-1.24.tar.gz\n","Requirement already satisfied: setuptools in /usr/local/lib/python3.6/dist-pack

interceptar update term en wordpress

add_filter('wp_update_term_data', 'morton_modify_term_post_title', 99, 4);
function morton_modify_term_post_title($data, $term_id, $taxonomy, $args) {
  // tax activity category
  if($taxonomy == 'activity_category') {
    if( isset($_POST['acf']) && 
        isset($_POST['acf']["field_5f19d4336963e"]) ) {

      $title = $_POST['acf']["field_5f19d4336963e"];
      $title = str_replace(["\r\n", "\n"]," ",$title);
      $title = strip_tags($title);
      $title = str_replace("\\","",$title);

      $data['name'] = $title;
    }
  }
  
  return $data;
}

Connect to SharePoint Online

#Check to see if the module is installed
Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version

#Install the module
Install-Module -Name Microsoft.Online.SharePoint.PowerShell

#You need to import the module to make it work
Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking

#Log into SharePoint
$adminUPN="mike@xxx.onmicrosoft.com"
$orgName="xxx"
$userCredential = Get-Credential -UserName $adminUPN -Message "Login Dude!"
Connect-SPOService -Url https://$orgName-admin.sharepoint.com -Credential $userCredential