values.map(&:name)
or the standard way
values.collect{|val| val.name}
When I started this blog (2004) it was to document Gentoo linux experiences and *nix adventures. Then it turned into posts regarding software development challenges and other findings. These days I mostly tweet (rollinsruss) and my posts are infrequent.
values.map(&:name)
values.collect{|val| val.name}
(defvar gse-locate-regexp-list
(list "\\.elc"
"\\.class"
"/CVS"
"/target/classes"
"#"
"~"
".cvsignore"
"/\.svn/"
)
"A list of regular expressions that match \"uninteresting\" filenames.
These will be stripped from the locate list before it is displayed.")
(global-set-key (kbd "") (lambda () (interactive) (insert (x-get-selection 'PRIMARY 'COMPOUND_TEXT))))
(setq x-select-enable-clipboard t)
(setq x-select-enable-clipboard nil)
maven.junit.jvmargs=-server -Dconfiguration.resourceType=properties ... -Xrunjdwp:transport=dt_socket,address=8787,server=y -Xmx512m
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>
-server -Dconfiguration.resourceType=properties ... -Xrunjdwp:transport=dt_socket,address=8787,server=y -Xmx512m
</argLine>
</configuration>
</plugin>
</plugins>
</build>
...
</project>
Suppose you want to use Hibernate in your project. You would simply add a new dependency to the dependencies section in pom.xml, as follows:
hibernate
hibernate
3.0.3
compile
And that's it! You don't have to hunt around to know in which other JARs (and in which versions) you need to run Hibernate 3.0.3; Maven will do it for you!
Key: HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Parameters
Value: "Schema Update Allowed" = 0x1
Right-click on ADAM ADSI Edit, select "Connect to..."
select "Distinguished name or naming context"
enter "cn=users,dc=devdomain,dc=it,dc=vital" (adjust dc values as necessary)
click "Ok"
expand the tree, find the CN of the user to edit
right-click on user, select "Properties"
find the "imsid" attribute, edit, apply
require 'ldap'
host = "192.168.88.20"
port = 389
username = "servuser"
login = "servuser@devdomain.it.vital"
password = "mypassword"
found_imsid = "not_found"
dn = "cn=users,dc=devdomain,dc=it,dc=vital"
connection = LDAP::Conn.new(host,port)
connection.set_option(LDAP::LDAP_OPT_PROTOCOL_VERSION,3)
connection.bind(login, password)
result = connection.search2( dn, LDAP::LDAP_SCOPE_SUBTREE, "cn=#{username}", ["imsid"])
if(result.size == 1)
found_imsid = result.first["imsid"][0]
end
p found_imsid
#!/sbin/runscript
#
# Copyright (c) 2006 Bradley Taylor, bradley@railsmachine.com
#
# Updated Oct 2006 by Russell Rollins for Gentoo compliance.
#
# mongrel_cluster Startup script for Mongrel clusters.
#
# chkconfig: - 85 15
# description: mongrel_cluster manages multiple Mongrel processes for use # behind a load balancer.
#
CONF_DIR=/etc/mongrel_cluster
RETVAL=0
depend() {
need net
}
start() {
ebegin "Starting Mongrel cluster"
/usr/bin/mongrel_cluster_ctl start -c ${CONF_DIR}
eend $?
}
stop() {
ebegin "Stopping Mongrel cluster"
/usr/bin/mongrel_cluster_ctl stop -c ${CONF_DIR}
eend $?
}
gem install mongrel_cluster capistrano --include-dependencies
ListenHTTP
Address 0.0.0.0
Port 80
Service
BackEnd
Address 0.0.0.0
Port 8000
End
BackEnd
Address 0.0.0.0
Port 8001
End
BackEnd
Address 0.0.0.0
Port 8002
End
Session
Type BASIC
TTL 300
End
End
End
/etc/init.d/pound start
rc-update add pound default
cwd: /home/build/deploy/current
port: "8000"
environment: development
address: 0.0.0.0
pid_file: log/mongrel.pid
servers: 3
cap --apply-to /path/to/railsapp MyApplicationName
set :mongrel_conf, "#{current_path}/config/mongrel_cluster.yml"
role :web, "someserver.yourinternaldomain.local"
set :deploy_to, "/home/build/deploy"
set :user, "build"
set :keep_releases, 5
rake remote:exec ACTION=setup
rake deploy
mkdir /etc/mongrel_cluster
ln -s /home/build/deploy/current/config/mongrel_cluster.yml /etc/mongrel_cluster/railsapp.yml
ln -s /usr/lib/ruby/gems/1.8/gems/mongrel_cluster-0.1.3/resources/mongrel_cluster /etc/init.d/mongrel_cluster
chmod +x /etc/init.d/mongrel_cluster
rc-update /etc/init.d/mongrel_cluster default
/etc/init.d/mongrel_cluster start