Skip to content

Instantly share code, notes, and snippets.

View vranac's full-sized avatar

Vranac Srdjan vranac

  • Novi Sad, Vojvodina, Serbia
View GitHub Profile
@vranac
vranac / gist:1323310
Created October 28, 2011 19:41
phpdoc ignore
<target name="phpdoc">
<exec executable="phpdoc">
<arg line="--directory ${basedir} --target ${basedir}/build/api --ignore ${basedir}/library/Zend/,${basedir}/library/MAL/" />
</exec>
</target>
@vranac
vranac / .gitconfig
Last active December 31, 2015 17:19
[difftool]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[merge]
tool = opendiff
± traceroute phpsrbija.rs
traceroute: Warning: phpsrbija.rs has multiple addresses; using 82.192.92.55
traceroute to phpsrbija.rs (82.192.92.55), 64 hops max, 52 byte packets
1 router.asus.com (192.168.1.1) 0.986 ms 0.721 ms 0.673 ms
2 192.168.0.1 (192.168.0.1) 1.397 ms 1.602 ms 1.344 ms
3 178-221-128-1.dynamic.isp.telekom.rs (178.221.128.1) 8.030 ms 7.537 ms 7.151 ms
4 212.200.15.93 (212.200.15.93) 10.508 ms 7.398 ms 7.269 ms
5 212.200.16.156 (212.200.16.156) 20.881 ms 21.422 ms 20.663 ms
6 212.200.6.238 (212.200.6.238) 9.803 ms 9.174 ms 9.285 ms
7 212.200.5.105 (212.200.5.105) 35.532 ms 21.965 ms 21.933 ms
<?php
use Doctrine\Common\Annotations\AnnotationRegistry;
use Composer\Autoload\ClassLoader;
/**
* @var ClassLoader $loader
*/
$loader = require __DIR__.'/../vendor/autoload.php';
vranac at vurunica in ~
○ memtest all
Memtest version 4.22 (64-bit)
Copyright (C) 2004 Charles Cazabon
Copyright (C) 2004-2008 Tony Scaminaci (Macintosh port)
Licensed under the GNU General Public License version 2 only
Mac OS X 10.9.3 (13D65) running in multiuser mode
Memory Page Size: 4096
± vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Resuming suspended VM...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2200
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection refused. Retrying...
==> default: Machine booted and ready!
<?php
interface iPropulsion
{
public function accelerate();
public function decelerate();
}
interface iOrdonance
{
public function testInsertingSomething()
{
$something = array(
'something_id' => 123,
'someother_value' => 10
);
$dbMock = m::mock('Zend_Db_Adapter_Mysqli');
$dbMock->shouldReceive('fetchOne')
->with('SELECT something_id FROM somethings WHERE something_id = ?', 123)
CREATE CONSTRAINT ON (deal:Deal) ASSERT deal.id IS UNIQUE;
USING PERIODIC COMMIT 5000
LOAD CSV WITH HEADERS FROM "file:///Users/vranac/dev/deals/temp/deals_100k.csv" AS row
WITH row
MERGE (d:Deal {Id: row.id})
ON CREATE SET d.Id = row.id,
d.a = row.a,
d.b = row.b,
// 2014-12-05,
@vranac
vranac / relations
Last active August 29, 2015 14:10
Neo4j relationships
CREATE INDEX ON :Airport(IataCode);
CREATE INDEX ON :Deal(OriginId);
CREATE INDEX ON :Deal(DestinationId);
MATCH (ao:Airport),(d:Deal)
WHERE d.OriginId = ao.IataCode
MERGE (ao)-[ro:ORIGIN]->(d);
MATCH (ad:Airport),(d:Deal)
WHERE d.DestinationId = ad.IataCode