Skip to content

Instantly share code, notes, and snippets.

View pschyska's full-sized avatar
🤔
Aber das geht doch besser‽

Paul Schyska pschyska

🤔
Aber das geht doch besser‽
View GitHub Profile
@pschyska
pschyska / spotify-client.spec
Created May 22, 2014 08:20
spotify-client.spec
#These refer to the installer, not the main package:
%global commit 095c05612000e571634997c5b0e44e828abb44bc
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global repo http://repository.spotify.com/pool/non-free/s/spotify
%global github_repo https://github.com/pschyska/spotify-make/archive/%{commit}
# We cannot strip this binary (licensing restrictions).
%global debug_package %{nil}
%global __os_install_post \
@pschyska
pschyska / designer.html
Last active August 29, 2015 14:13
designer
<link rel="import" href="../google-map/google-map-search.html">
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
def self.options_for(column,query)
case column
when 'mailing_list_address'
r=find(query)
(do stuff with r and return array)
else
[]
end
end
if (typeof console == 'undefined') {
console={}
console.info=function () {
}
console.log=console.info;
console.debug=console.info;
console.warn=console.info;
console.error=console.info;
console.assert=console.info;
console.clear=console.info;
class Netzke::Modules::Core::People < Netzke::ThemisGrid
def config
super.merge({
:title=>'Personen',
:model=>'Netzke::ModelExtensions::CorePerson',
:scope=>{:person_type=>'natürlich'},
:context_menu => nil,
:tbar=>[:search.ext_action],
:columns=>[:name,:first_name,:roles],
})
activesupport (3.0.0) lib/active_support/whiny_nil.rb:48:in `method_missing'
actionpack (3.0.0) lib/action_controller/caching/sweeping.rb:82:in `callback'
actionpack (3.0.0) lib/action_controller/caching/sweeping.rb:64:in `after'
activesupport (3.0.0) lib/active_support/callbacks.rb:331:in `around'
activesupport (3.0.0) lib/active_support/callbacks.rb:314:in `_callback_around_1521'
activesupport (3.0.0) lib/active_support/callbacks.rb:219:in `_conditional_callback_around_2432'
activesupport (3.0.0) lib/active_support/callbacks.rb:440:in `_run__536258684__process_action__878122263__callbacks'
activesupport (3.0.0) lib/active_support/callbacks.rb:409:in `_run_process_action_callbacks'
activesupport (3.0.0) lib/active_support/callbacks.rb:93:in `run_callbacks'
actionpack (3.0.0) lib/abstract_controller/callbacks.rb:17:in `process_action'
action :fax,
{
:text =>'Fax',
:icon =>:page_white_text,
:disabled =>true
}
When /^(?:|I )should really see "([^"]*)"(?: within "([^"]*)")?$/ do |text, scope|
page.wait_until{ page.evaluate_script("!Ext.Ajax.isLoading()") }
found=page.driver.browser.execute_script <<-JS
var found=false;
Ext.ComponentMgr.all.each(function(cp) {
if(cp.el) {
if(cp.el.getAttribute('textContent').indexOf('#{text}')!= -1) {
if(cp.el.isVisible()) {
found=true;
} else {
module WaitHelper
def wait
page.wait_until(5.seconds){ page.evaluate_script("!Netzke.isLoading()") }
page.wait_until(5.seconds){ page.evaluate_script("!Ext.Ajax.isLoading()") }
end
end
World(WaitHelper)
module TextClicker
def click_on_text text
guard 'shell' do
watch('^coffee/public/(.*)') {|m|
`mkdir -p public/`
filename=m[0].split('coffee/public/')[1]
unless filename.split('.').pop=='coffee'
tmp=filename.split('/')
tmp.pop
target_dir=tmp.join('/')
unless target_dir.empty?
puts "mkdir -p #{'public/' + target_dir}"