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
@harikt
harikt / escape.php
Created April 18, 2012 18:48
Sample with Aura View Escaper Branch
<?php
$package_dir = dirname( __DIR__ ) . '/aurasystem/package';
$template = require_once $package_dir . '/Aura.View/scripts/instance.php';
// require_once $package_dir . '/Aura.Cli/src.php';
$template->var = 'Hello World';
$escaper = new stdclass();
$escaper->c = 'x';
$escaper->c .= ' > ';
$escaper->c .= ' 2 ';
@harikt
harikt / layout.mustache
Created May 17, 2012 18:52
Playing with Phly Mustache
{{!layout}}
{{%SUB-VIEWS}}
<html>
<body>
{{content}}
</body>
</html>
@harikt
harikt / composer.json
Created July 6, 2012 19:41
composer.json
/**
*
* Here there is a problem for packages is only for Vendor.Package .
* Probably if we are downloading other ones like Propel, Doctrine or
* anything needs to be in include folder.
*
*/
{
"config": {
"vendor-dir": "package/"
{
"name": "hari/aura-system",
"minimum-stability": "dev",
"repositories": {
"aura-unofficial": {
"type": "package",
"package": [{
"type": "aura-package",
"name": "aura/autoload",
"version": "1.0.0-beta3",
@harikt
harikt / index.html.php
Created August 4, 2012 14:50 — forked from webmozart/composer.json
Symfony 2.1 stand-alone form usage with PHP templates
<html>
<head>
<title>Standalone Form Component</title>
</head>
<body>
<form action="#" method="post">
<?php echo $view['form']->widget($form); ?>
<input type="submit" />
</form>
</body>
public function value(&$value, $method, $name)
{
// get the params
$params = func_get_args();
array_shift($params); // $value
array_shift($params); // $method
array_shift($params); // $name
// set up the field name and data
$field = 'field';
@harikt
harikt / spider.php
Created September 23, 2012 14:59 — forked from ralphschindler/spider.php
Script to be used with PHP's built-in webserver to proxy and spider a site on click
<?php
// start PHP with: php -S localhost:8888 -t . spider.php
$site = 'http://www.targetwebsite.org/';
$path = $_SERVER["REQUEST_URI"];
if ($path == '/') {
$path = '/index.html';
@harikt
harikt / generate.php
Created October 5, 2012 04:56
A script to generate API of all aura packages with apigen
<?php
// A script to generate API of all aura packages with apigen
$path = __DIR__ . DIRECTORY_SEPARATOR;
$package_path = $path . 'package';
$docs_path = $path . 'docs';
$dir = new DirectoryIterator( $package_path );
foreach ($dir as $fileinfo) {
if (!$fileinfo->isDot()) {
$dirname = $fileinfo->getFilename();
if ( $dirname == '.placeholder' ) {
@harikt
harikt / checkout.php
Created October 5, 2012 04:56
A script used tp switch between all aura packages to same branch.
<?php
/**
*
* A script used tp switch between all aura packages to same branch.
*
* This is still experimental one :)
*
* Usage
*
* php checkout.php <branch>
@harikt
harikt / mouseleave
Created November 16, 2012 02:29
Trigger an event on leaving the mouse from the lightbox.
<html>
<head>
<script src="http://jquery.phpbasic.com/jquery-1.3.2.min.js"></script>
<script src="http://jquery.phpbasic.com/divbox.js"></script>
<link rel="stylesheet" href="http://jquery.phpbasic.com/css/divbox.css" />
</head>
<body>
<a href="hello.html" class="ajax">Ajax</a>​
<script>
$('.ajax').divbox({type: 'ajax',caption: false});