Skip to content

Instantly share code, notes, and snippets.

View harikt's full-sized avatar
⛱️
Tanvish Technologies

Hari K T harikt

⛱️
Tanvish Technologies
View GitHub Profile
@barryvdh
barryvdh / laravel-docs-scraper.php
Created June 9, 2015 19:20
Laravel docs scraper
<?php
// composer require fabpot/goutte
Route::get('docs', function(){
$host = 'http://laravel.com';
$base = '/docs/5.1/';
$client = new Goutte\Client();
$crawler = $client->request('GET', $host.$base);
@alexanderschnitzler
alexanderschnitzler / openletter.md
Last active August 16, 2018 19:14
An open letter to the Neos development team

An open letter to the Neos development team

Dear members of the development team, CU a few days ago I commented the announcement, that Neos and Flow get rid of "TYPO3" as part of their names, as follows:

Removing "TYPO3" from Neos and Flow makes it easier to quietly abandon these products. \o/

Additionally to this tweet I had a small twitter conversation resulting in this tweet:

@Ocramius
Ocramius / SimpleFixtureLoader.php
Created March 3, 2015 16:57
Simple array-based fixture loader for Doctrine ORM
<?php
namespace FixtureLoader;
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Instantiator\Instantiator;
class SimpleFixtureLoader
{
@iansltx
iansltx / FastForwarder.php
Last active August 29, 2015 14:15
Calculate due dates, taking business days into account
<?php
class FastForwarder
{
protected $skipWhen = [];
protected $numDays = 0;
public static function createWithDays($num_days)
{
$ff = new static;
@manviny
manviny / PwAngular.module
Last active January 23, 2016 03:02
Processwire module to add angularjs to all pages
<?php
/**
* ProcessWire 'Hello world' demonstration module
*
* Demonstrates the Module interface and how to add hooks.
*
* See README file for further links regarding module development.
*
* ProcessWire 2.x
<?php
use PHPUnit_Framework_TestCase;
use Symfony\Component\DomCrawler\Crawler;
class SimpleHttpTest extends PHPUnit_Framework_TestCase
{
public function testHttp()
{
$crawler = new Crawler(file_get_contents('http://myapp.lcl/hello/Jon'));
@trq
trq / scomposer
Last active August 29, 2015 14:08
#!/usr/bin/env bash
d=$(date +%s)
remote='some-aws-box'
dir="composer-$d.tmp"
if [ -f composer.json ]; then
ssh $remote mkdir "$dir"
scp composer.json $remote:"$dir"/composer.json
@harikt
harikt / Author.php
Created August 10, 2014 06:58
Experiments reinventing wheel :)
<?php
class Author
{
private $name;
private $id;
public function __construct(AuthorId $id, $name = '')
{
$this->id = $id;
$this->name = $name;
@harikt
harikt / questions.md
Last active August 29, 2015 14:04
When and where are you using an event / signal hanlder ?

Are you making use of the event handling system like Symfony event handler, Aura.Signal, Zend event manager or any other in your core framework?

Are you using signal/events before they hit the action class ( controller action ) ?

I have a feeling it will be good to have an event handling system in core of a framework.

The basic idea is to call a signal

  • before a route is checked
  • before dispatching
g:vdebug_options['path_maps'] = {"/var/www/cc": "/Users/trq/src/clients/cc/site"}
autocmd FileType html setlocal ts=2 sts=2 sw=2 expandtab
autocmd FileType htmljinja setlocal ts=2 sts=2 sw=2 expandtab
autocmd FileType css setlocal ts=2 sts=2 sw=2 expandtab
autocmd FileType javascript setlocal ts=2 sts=2 sw=2 expandtab
autocmd FileType php setlocal ts=4 sts=4 sw=4 expandtab