Skip to content

Instantly share code, notes, and snippets.

Adam Pohorecki psyho

Block or report user

Report or block psyho

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
psyho / cli_builder.rb
Created Sep 1, 2016
CLI builder example
View cli_builder.rb
module HashConstructor
def initialize(attrs = {})
attrs.each do |name, value|
send("#{name}=", value)
class AwsCli
include HashConstructor
psyho / core.clj
Last active Oct 15, 2015
Property-based testing dojo
View core.clj
(ns dojo.core
(:require [clojure.test.check :as tc]
[clojure.test.check.generators :as gen]
[ :as prop]
[clojure.test :refer :all]))
(def balls identity)
(defn add-ball [rack ball] (conj rack ball))
psyho / foo_spec.rb
Created Apr 29, 2014
How to combine Bogus and rspec-mocks (or other mocking library) in one project
View foo_spec.rb
require 'spec_helper'
class Foo
def initialize(bar)
@bar = bar
def foo
psyho / bogus-minitest.rb
Created May 11, 2013
Bogus.have_received in minispec
View bogus-minitest.rb
require 'minitest/autorun'
require 'set' # bummer, I forgot to require set in Bogus
require 'bogus'
class Foo
def bar(x, y)
module Bogus
psyho / notatki
Created Apr 10, 2013
Notatki z SCKRK #40 - Lean Coffee
View notatki
* sckrk workshops (4)
- warsztaty z security
* open data (4)
- jak uwalniać dane z miasta
* why we fail in tdd and what we do about it (7)
* ddd-krk (7)
- nowy meetup dla ludzi z DDD
* formuła spotkań (3)
- co poza reading club i lean coffee
psyho / Gemfile
Created Nov 2, 2012
Typhoeus 0.4.2 Memory Leak
View Gemfile
source :rubygems
# no leak in version 0.3.3
# gem 'typhoeus', '0.3.3'
# memory leaking very fast (1Mb/s) in version 0.4.2
gem 'typhoeus', '0.4.2'
psyho / partials.html
Created Aug 24, 2011
caching partials in angular
View partials.html
<!doctype html>
<html xmlns:ng="">
<script src="" ng:autobind></script>
<script type="text/javascript">
// this is the service generated by partials.rb
angular.service('partials', function() {
return {
'/foo': 'Foo template',
'/bar': 'Bar template'
psyho / index.html
Created Aug 3, 2011
inline edit and dirty detection
View index.html
<html xmlns:ng="">
<title>Inline Edit</title>
<script src="" type="text/javascript"></script>
<script src="" type="text/javascript" ng:autobind></script>
<style type="text/css">
.dirty {
You can’t perform that action at this time.