Skip to content

Instantly share code, notes, and snippets.

View kazjote's full-sized avatar

Kacper Bielecki kazjote

View GitHub Profile
@kazjote
kazjote / bloomd_crash.rb
Last active December 12, 2015 00:09
armon/bloomd will crash after a few runs of these
#!/usr/bin/env ruby
require 'socket'
ADDRESS = '127.0.0.1'
PORT = 8673
FILTER_NAME = 'filter_crasher'
20.times do |i|
(fn [n] (->>
(range 2 n)
(filter (fn [x]
(not (some #(and (= 0 (rem x %)) (= 0 (rem n %))) (range 2 (inc x))))))
count
inc))
@kazjote
kazjote / .Xmodmap
Created October 5, 2012 18:33
my keyboard mappings for typematrix keyboard
! Add right alt to control group
clear mod5
keycode 108 = Control_R
add control = Control_R
! Remap mail to page up and caps to page down
keycode 66 = Next
keycode 163 = Prior
@kazjote
kazjote / .vimrc
Created March 22, 2012 09:33
vimrc
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
@kazjote
kazjote / populate.rb
Created January 8, 2012 18:31
FnordMetric data generator
# Copy it to fnordmetric directory and run with
#
# bundle exec ruby -Ilib -I. populate.rb live
#
# to generate fake current traffic or
#
# bundle exec ruby -Ilib -I. populate.rb past
#
# to generate fake stats for last month.
#
Selenium::WebDriver::Error::InvalidSelectorError:
The given selector "./descendant-or-self::*[contains(normalize-space(.), 'Who are you? Question number 1')] is either invalid or does not resultin a Webelement. The following error occurred:
[InvalidSelectorError] Unable to locate elements with the xpath expression ./descendant-or-self::*[contains(normalize-space(.), 'Who are you? Question number 1')] because of the following error:
[Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIDOMXPathEvaluator.createNSResolver]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: resource://fxdriver/modules/atoms.js :: <TOP_LEVEL> :: line 2360" data: no]
# [remote server] file:///tmp/webdriver-profile20110824-22465-be82oi/extensions/[email protected]/components/driver-component.js -> file:///tmp/webdriver-profile20110824-22465-be82oi/extensions/[email protected]/components/firefoxDriver.js:466:in `unknown'
# [remot
#!/usr/bin/env ruby
# Simple script which can be used with couchapp to automatically
# push applications to couchdb on files update on systems supporting inotify.
#
# First install rubygems in your system, then:
#
# $ sudo gem install rb-inotify
# $ cd couchapp_project
# $ ./couchapp_updater