Skip to content

Instantly share code, notes, and snippets.

bonyiii

Block or report user

Report or block bonyiii

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
View cucumber view
Given /^I want to see where I am$/ do
tmp = Tempfile.new 'culerity_results'
tmp << $browser.html
tmp.close
`konqueror #{tmp.path}`
end
View unixODBC FREETDS RUBY exec
If one wants to call MSSQL statements like this
declare @aha as varchar(4000);
set @aha='SELECT * FROM pubs.dbo.titles;';
exec(@aha)
One have to use prepare/execute combo:
statement = dbconn.prepare( sql )
results = statement.execute # vagy statement.run
Point is to prepare before execute
View my cucumber culerity common steps
require 'culerity'
Before do
$rails_server ||= Culerity::run_rails
sleep 5
$server ||= Culerity::run_server
$browser = Culerity::RemoteBrowserProxy.new $server, {:browser => :firefox3#,
#:resynchronize => true,
#:javascript_exceptions=>true,
#:refresh_handler=> :waiting,
View gist:370413
bear-chef certificates # ls -la /etc/chef/
total 28
drwxr-xr-x 4 chef chef 4096 Apr 17 19:28 .
drwxr-xr-x 46 root root 4096 Apr 17 19:17 ..
-rw-r--r-- 1 root root 0 Mar 26 15:51 .keep_app-admin_chef-0
-rw-r--r-- 1 chef chef 0 Apr 17 18:56 .keep_app-admin_chef-server-0
-rw-r--r-- 1 chef chef 0 Mar 26 16:53 .keep_app-admin_chef-solr-0
drwx------ 2 chef chef 4096 Apr 17 19:35 certificates
drwxr-xr-x 8 root root 4096 Apr 1 14:46 chef-repo
-rw-r--r-- 1 chef chef 496 Mar 26 15:51 client.rb
View gist:370428
bear-chef chef # egrep -v '^\s*(#|$)' /etc/chef/server.rb
log_level :debug
log_location '/var/log/chef/server.log'
ssl_verify_mode :verify_none
chef_server_url 'http://localhost:4000'
signing_ca_path '/var/lib/chef/ca'
signing_ca_cert '/var/lib/chef/ca/cert.pem'
signing_ca_key '/var/lib/chef/ca/key.pem'
couchdb_database 'chef'
cookbook_path [ '/var/lib/chef/cookbooks', '/var/lib/chef/site-cookbooks' ]
View Chef setup hun
# Chef telepítés.
# Itt lehet infókat találni arról, hogy kell telepíteni chef -et.
# Először ezt csináljuk végig.
#http://github.com/veszig/chef-overlay
#http://wiki.opscode.com/pages/viewpage.action?pageId=1180116
#http://github.com/opscode/chef-repo
###
# Szever
View gist:443716
include_recipe "gentoo::portage"
use_flags << node[:subversion][:use_flags].to_a.each do |use_flag|
"/bin/egrep '(\"| )#{bash-completion}{use_flag}(\"| )' | "
end
bash "test_use_flags" do
user "root"
code <<-EOC
@bonyiii
bonyiii / node.recipe? in chef 0.9 (hun)
Created Jun 30, 2010
node.recipe? in chef 0.9 (hun)
View node.recipe? in chef 0.9 (hun)
# Így lehet a 0.9 -ben ellenőrzini, hogy az adott recepet szerepel -e a node run_list -jében.
node.run_list.include?("monit")
# Ha van egy receptem amiben attól függően akarok valamit csinálni, hogy egy másik recepet installálva van -e vagy sem
# akkor a fenti szintakszissal ellenőrizhetem le, hogy az recept le fog -e futni.
# rövidebben
if node.run_list?(monit")
monit_check "syslog-ng"
end
View git-shell
under gentoo git-shell is at /usr/bin/git-shell
Put in /etc/passwd like this
git:x:1000:1005::/opt/git:/usr/bin/git-shell
View Missing IUSE
Nem tudtam telepíteni a webrat -et mert azt mondta, hogy:
emerge: there are no ebuilds built with USE flags to satisfy ">=dev-ruby/rack-1.0[ruby_targets_ruby18]".
!!! One of the following packages is required to complete your request:
- dev-ruby/rack-1.0.1 (Missing IUSE: ruby_targets_ruby18)
- dev-ruby/rack-1.0.0 (Missing IUSE: ruby_targets_ruby18)
(dependency required by "dev-ruby/webrat-0.7.1" [ebuild])
(dependency required by "webrat" [argument])
Mindig a "keywords" -el van baj ilyenkor.
A legutóbb az volt, hogy a rack-1.0.1 ebuild nem volt jó és a rack-1.0.1-r1 -ben javították a hibát.
You can’t perform that action at this time.