Skip to content

Instantly share code, notes, and snippets.

View sunil-bagde's full-sized avatar
🎨
Fullstack Developer [NodeJS,ReactJS]

Sunil Bagde sunil-bagde

🎨
Fullstack Developer [NodeJS,ReactJS]
View GitHub Profile
#
# sublimelinter.py
# Part of SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ryan Hileman and Aparajita Fishman
#
# Project: https://github.com/SublimeLinter/SublimeLinter3
# License: MIT
#
@sunil-bagde
sunil-bagde / MyComponent.js
Created March 11, 2018 11:42 — forked from joecritch/MyComponent.js
Passing specific props in React / JSX
class MyComponent extends React.Component {
render() {
const {location, todos, users} = this.props;
//
// ... do things with your variables!
//
return (
<MyChild {...{location, todos, user}} />
// equivalent to:
// <MyChild location={location} todos={todos} user={user} />
<?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
# 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
// 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();
```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() );
// 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);
$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() )
);
}