Skip to content

Instantly share code, notes, and snippets.

View sunil-bagde's full-sized avatar

Sunil Bagde sunil-bagde

View GitHub Profile
import PopperTooltip from 'tooltip.js';
new Vue({
el: '#app',
mounted() {
document.querySelectorAll('[data-tooltip]').forEach(elem => {
new PopperTooltip(elem, {
placement: elem.dataset.tooltipPlacement || 'top',
title: elem.dataset.tooltip
<?php
namespace App\Core\Concerns;
trait AuthorizesVue
{
/**
* Accessor for can attribute.
*/
public function getCanAttribute()
$finder = new Finder;
$finder->in(resource_path('learn'))->files()->name('*.php');
foreach ($finder as $key => $file) {
$converter = new Markdownify\Converter;
file_put_contents(
$file->getBasename('.' . $file->getExtension()) . '.md',
$converter->parseString( $file->getCotent() )
);
}
// https://github.com/PHPOffice/PhpSpreadsheet
$inputFileName = public_path('example2.xls');
$reader = new Xls();
$spreadsheet = $reader->load($inputFileName);
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);
print_r($sheetData);
```php
// https://github.com/PHPOffice
// https://github.com/mtibben/html2text
$phpWord = \PhpOffice\PhpWord\IOFactory::load(public_path('Sample_11_ReadWord97.doc'), 'MsDoc');
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'HTML');
$html = new \Html2Text\Html2Text($objWriter->getContent() );
```php
// https://github.com/PHPOffice
// https://github.com/mtibben/html2text
$phpWord = \PhpOffice\PhpWord\IOFactory::load('Template.docx');
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007');
$fullXml = $objWriter->getWriterPart('Document')->write();
# Learn react
1. As always document is good source to learn.
## Books
1.[Pure react](https://daveceddia.com/pure-react/)
2.[Full stack react] (https://www.fullstackreact.com/)
## Videos
1.[Beginner's react](https://egghead.io/courses/the-beginner-s-guide-to-react)
<?php
namespace Supawdog\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Process\ProcessUtils;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Process\PhpExecutableFinder;
class WebpackCommand extends Command