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 / traceroute.md
Last active June 17, 2016 06:38
What does the 5th one says, pointing to different IP and provider. I am using Asianet, but from Cochin it tries to make use of vsnl.net and airtelbroadband.
$ traceroute google.com -q 10

traceroute to google.com (216.58.197.78), 30 hops max, 60 byte packets
 1  10.5.1.1 (10.5.1.1)  16.832 ms  16.844 ms  16.896 ms  19.838 ms  21.388 ms  21.407 ms  21.501 ms  21.519 ms  21.582 ms  21.608 ms
 2  126.231.88.202.asianet.co.in (202.88.231.126)  26.045 ms  26.366 ms  26.429 ms  26.458 ms  26.531 ms  26.582 ms  58.570 ms  63.071 ms  33.628 ms  43.840 ms
 3  * * * * * * * * * *
 4  4.231.88.202.asianet.co.in (202.88.231.4)  45.732 ms  45.780 ms  48.274 ms  48.317 ms  17.862 ms  12.071 ms  16.175 ms  17.557 ms  15.071 ms  18.098 ms
 5  illekm-static-203.200.136.46.vsnl.net.in (203.200.136.46)  67.002 ms 121.241.181.45.static-Ernakulam.vsnl.net.in (121.241.181.45)  68.360 ms illekm-static-203.200.136.33.vsnl.net.in (203.200.136.33)  71.786 ms illekm-static-203.200.136.46.vsnl.net.in (203.200.136.46)  67.664 ms 121.241.181.45.static-Ernakulam.vsnl.net.in (121.241.181.45)  75.206 ms  73.544 ms abts-north-static-209.224.246.61.airtelbroadband.in (61.246.224.209)  16.6
@harikt
harikt / composer.json
Last active June 10, 2016 16:01
Get all the contributors from the repos of an organization
{
"require": {
"guzzlehttp/guzzle": "4.*"
}
}
<?php
use Cake\Event\EventListenerInterface;
class ModelInitialzieListener implements EventListenerInterface
{
public function implementedEvents()
{
return array(
'Model.initialize' => 'initializeEvent',
);
<?php
namespace App\Model\Behavior;
use Cake\Datasource\EntityInterface;
use Cake\Event\Event;
use Cake\ORM\Behavior;
use Cake\ORM\Table;
use Cake\ORM\TableRegistry;
class HistoryBehavior extends Behavior
@harikt
harikt / Product.php
Last active January 2, 2016 03:50
When there is no double star `/**` it is no more a doc comment, but comment only.
<?php
/**
* @Entity @Table(name="products")
*/
class Product
{
/**
* @Id @Column(type="integer")
* @GeneratedValue
* @var int
@harikt
harikt / pre-commit
Last active September 17, 2015 15:20 — forked from jwage/pre-commit
#!/usr/bin/env bash
ROOT="/data/devo/current"
echo "OpenSky pre commit hook start"
PHP_CS_FIXER="vendor/bin/php-cs-fixer"
HAS_PHP_CS_FIXER=false
HAS_JSHINT=false
Deprecation Notice: Composer\Package\Version\VersionParser::parseLinks is deprecated. Use \Composer\Package\Loader\ArrayLoader::parseLinks() instead in phar:///var/www/composer.phar/src/Composer/Package/Version/VersionParser.php:226
Deprecation Notice: Composer\Package\Version\VersionParser::parseLinks is deprecated. Use \Composer\Package\Loader\ArrayLoader::parseLinks() instead in phar:///var/www/composer.phar/src/Composer/Package/Version/VersionParser.php:226
Deprecation Notice: Composer\Package\Version\VersionParser::parseLinks is deprecated. Use \Composer\Package\Loader\ArrayLoader::parseLinks() instead in phar:///var/www/composer.phar/src/Composer/Package/Version/VersionParser.php:226
Deprecation Notice: Composer\Package\Version\VersionParser::parseLinks is deprecated. Use \Composer\Package\Loader\ArrayLoader::parseLinks() instead in phar:///var/www/composer.phar/src/Composer/Package/Version/VersionParser.php:226
Deprecation Notice: Composer\Package\Version\VersionParser::parseLinks is deprecated. Use \C
{
"require": {
"hoa/bench":"~2.0"
}
}
@harikt
harikt / process.md
Created August 20, 2015 09:29
List of process
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  35144  3640 ?        Ss   09:44   0:01 /sbin/init splash
root         2  0.0  0.0      0     0 ?        S    09:44   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    09:44   0:00 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S<   09:44   0:00 [kworker/0:0H]
root         7  0.1  0.0      0     0 ?        S    09:44   0:24 [rcu_sched]
root         8  0.0  0.0      0     0 ?        S    09:44   0:00 [rcu_bh]
root         9  0.0  0.0      0     0 ?        S    09:44   0:15 [rcuos/0]
root        10  0.0  0.0      0     0 ?        S    09:44   0:00 [rcuob/0]
@harikt
harikt / Common.php
Created August 17, 2015 06:54
Configuring Doctrine ORM Entity Manager with Aura.Di
<?php
$di->set('entity_manager', function () {
// paths
$paths = array(__DIR__);
$isDevMode = false;
// the connection configuration
$dbParams = array(
'driver' => 'pdo_mysql',
'user' => getenv('username'),
'password' => getenv('password'),