Skip to content

Instantly share code, notes, and snippets.

load("@io_bazel_rules_go//go:def.bzl", "go_binary")
go_binary(
name = "hello",
srcs = ["hello.go"],
deps = ["@com_github_mattn_go_sqlite3//:go_default_library"]
)

Keybase proof

I hereby claim:

  • I am eugene-dounar on github.
  • I am eugene_dounar (https://keybase.io/eugene_dounar) on keybase.
  • I have a public key ASDScOjrpWB8PW64GCQ6BaxGAI2_FYS0smpLYgB8rTLXrgo

To claim this, I am signing this object:

@eugene-dounar
eugene-dounar / pcb.hs
Created June 26, 2016 09:57
Haskell vs PHP: simple domain logic example
newtype Rule = Rule String deriving (Show)
class RuleSet a where
getRules :: a -> [Rule]
data Bus = Bus [Rule] deriving (Show)
instance RuleSet Bus where
getRules (Bus rules) = rules
data Net = Net Bus [Rule] deriving (Show)
@eugene-dounar
eugene-dounar / guzzle-concurrent-promise.php
Last active August 29, 2015 14:22
Guzzle concurrent promise requests
<?php
use GuzzleHttp\Promise as P;
require_once __DIR__.'/vendor/autoload.php';
function createChain($client, $i) {
$delay = rand(0, 5);
echo "delay-$i-$delay\n";
$first = $client->getAsync("http://httpbin.org/delay/$delay")->then(function($resp) use($i) {
@eugene-dounar
eugene-dounar / selenium-node-chrome-delay
Created December 11, 2014 16:54
Docker image selenium/node-chrome slowstart when low RAM
root@dev:~# docker logs -f hc-test-chrome
16:43:06.811 INFO - Launching a selenium grid node
16:43:09.584 INFO - Java: Oracle Corporation 24.65-b04
16:43:09.587 INFO - OS: Linux 3.13.0-36-generic amd64
16:43:09.624 INFO - v2.44.0, with Core v2.44.0. Built from revision 76d78cf
16:43:09.892 INFO - Default driver org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match with current platform: LINUX
16:43:10.103 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:5555/wd/hub
16:43:10.104 INFO - Version Jetty/5.1.x
16:43:10.106 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
16:43:10.107 INFO - Started HttpContext[/selenium-server,/selenium-server]
<link href="../paper-button/paper-button.html" rel="import">
<link href="../paper-input/paper-input.html" rel="import">
<link href="../core-drawer-panel/core-drawer-panel.html" rel="import">
<polymer-element name="my-element">
<template>
<style>
#design_host {
position: absolute;
<?php
/**
* Registration
*/
$app->post('/users/', function (Request $request) use ($app) {
$user = $app->deserialize('Assurant\User', ['Registration']);
$app['users']->register($user);
return $app->serialize($user, 201);
@eugene-dounar
eugene-dounar / id_rsa.pub
Created June 14, 2013 22:08
Public SSH Key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCoPeUTEzIAyOOlfNcXQf7lWQGsxPaI49N0uM5n7usR/UfYOm+O01I2AleSFjE3oFf/vX/lbFhCUqpDnx0Tmn/qboATRivXOM7aZumVW7tao0v1w07A3+ol4TlO4Huo1ssV5gdugVIBPFEhEk9r1Kfw5yDT5kDV68SgEw2/2MsgelWNypT5O+rL9K8SC4pUlcZfluw7wuWm6OLFDPrCtnpGfpkIcpxoaGpp5zEEY6REpkvhaZ2ePwrOp2QceK0suqPFQsNwH3TG/pLn6EkrPaae8OzPT5AKZxxsO9qkUkzrkWupl+A+Iy4Kf9bfq2llzH2BByxFoEC2f6LUxac/F7rb eugene.dounar
@eugene-dounar
eugene-dounar / phpcs.xml
Created May 30, 2013 17:09
PHP CodeSniffer rules
<?xml version="1.0"?>
<ruleset name="Intellectsoft">
<description>Intellectsoft coding standard</description>
<exclude-pattern>*/Resources/*</exclude-pattern>
<rule ref="PSR2"/>
<rule ref="Symfony2.Formatting.BlankLineBeforeReturn"/>
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket"><severity>0</severity></rule>
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket"><severity>0</severity></rule>
[user]
email = eugene.dounar@intellectsoft.org
name = Eugene Dounar
[alias]
lg = log --graph --color --pretty=format:'%C(red)%h%C(reset) -%C(yellow)%d%C(reset) %s %C(green)(%cr) %C(bold blue)<%an>%C(reset)' --
[color]
ui = true
[core]
autocrlf = false
[push]