Skip to content

Instantly share code, notes, and snippets.

View indeyets's full-sized avatar

Alexey Zakhlestin indeyets

View GitHub Profile
<?php
class Symfony2App
{
private $kernel;
public function __construct(\Symfony\Foundation\Kernel $kernel)
{
$this->kernel = $kernel;
}
@indeyets
indeyets / steps.txt
Created April 6, 2015 20:01
Mink's steps
default | Given /^(?:|I )am on (?:|the )homepage$/
| Opens homepage.
| at `FeatureContext::iAmOnHomepage()`
default | When /^(?:|I )go to (?:|the )homepage$/
| Opens homepage.
| at `FeatureContext::iAmOnHomepage()`
default | Given /^(?:|I )am on "(?P<page>[^"]+)"$/
| Opens specified page.

Keybase proof

I hereby claim:

  • I am indeyets on github.
  • I am jimidini (https://keybase.io/jimidini) on keybase.
  • I have a public key whose fingerprint is A6CE DC75 11EF 851C 3D7A 48DA AF54 312A 1D21 9F11

To claim this, I am signing this object:

@indeyets
indeyets / merge.php
Created May 20, 2014 08:20
EasyRDF graph-merge example
<?php
require '../vendor/autoload.php';
$graph1 = new EasyRdf_Graph();
$graph1->addResource('http://example.org/1', 'dc:title', 'Hello, world!');
$graph1->addResource('http://example.org/2', 'dc:description', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
$graph2 = new EasyRdf_Graph();
$graph2->addResource('http://example.org/1', 'dc:description', 'Some boring description');
$graph2->addResource('http://example.org/2', 'dc:title', 'Hello, second world!');
@indeyets
indeyets / virtuoso.py
Created May 9, 2014 12:32
Virtuoso helper for SPARQLWrapper 1.6.0
from SPARQLWrapper import SPARQLWrapper
class VirtuosoWrapper(SPARQLWrapper):
def setParameter(self, name, value):
self.clearParameter(name)
return self.addParameter(name, value)
def setReturnFormat(self, output_format):
if output_format == 'jsonld':
@indeyets
indeyets / list.txt
Last active August 29, 2015 13:57
My installed Casks http://caskroom.io/
adium
android-file-transfer
anki
audacity
boxer
calibre
cog
cyberduck
dfontsplitter
dropbox
@indeyets
indeyets / appserver.php
Created March 7, 2014 19:49
Example of simple PHP application conversion to use https://github.com/indeyets/appserver-in-php
<?php
/**************************
* aip variant of php file
**************************/
class MyApp
{
public function __invoke($context)
{
$output = '<h1>Hello world</h1>';