Skip to content

Instantly share code, notes, and snippets.

Vranac Srdjan vranac

  • Novi Sad, Vojvodina, Serbia
Block or report user

Report or block vranac

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View traceroute
± 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
View app_autoload.php
<?php
use Doctrine\Common\Annotations\AnnotationRegistry;
use Composer\Autoload\ClassLoader;
/**
* @var ClassLoader $loader
*/
$loader = require __DIR__.'/../vendor/autoload.php';
View memtest-result
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
View gist:0980427ec87538aae390
± 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!
View better-example.php
<?php
interface iPropulsion
{
public function accelerate();
public function decelerate();
}
interface iOrdonance
{
View zf-db-mock.php
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)
View gist:d6aeb1eae81c65a78f59
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 Aug 29, 2015
Neo4j relationships
View relations
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
View centos-add-epel.sh
[vagrant@vagrant-centos65 ~]$ sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Preparing... ########################################### [100%]
package epel-release-6-8.noarch is already installed
View gist:1323310
<target name="phpdoc">
<exec executable="phpdoc">
<arg line="--directory ${basedir} --target ${basedir}/build/api --ignore ${basedir}/library/Zend/,${basedir}/library/MAL/" />
</exec>
</target>
You can’t perform that action at this time.