Skip to content

Instantly share code, notes, and snippets.

1, オリジナルソースの取得
% git clone https://github.com/syoyo/node.rdma.git
Cloning into node.rdma...
remote: Counting objects: 54, done.
remote: Compressing objects: 100% (40/40), done.
remote: Total 54 (delta 23), reused 41 (delta 10)
Unpacking objects: 100% (54/54), done.
hsato-mbp:tmp hsato$
@hiroyuki-sato
hiroyuki-sato / gist:4283247
Created December 14, 2012 06:53
Convert OpenDS Schema file to openldap schema
#!/usr/bin/ruby -w
print <<EOF
dn: cn={99}openam
objectClass: olcSchemaConfig
cn: {99}openam
EOF
idx = {
"attributeTypes" => 1,
@hiroyuki-sato
hiroyuki-sato / gist:4328270
Created December 18, 2012 14:10
Capistrano Executing a command as root without using sudo To avoid the error standard in must be a tty. Thank you Simone Carletti. http://www.simonecarletti.com/blog/2010/07/capistrano-executing-a-command-as-root-without-using-sudo/
#
# copy from
# http://www.simonecarletti.com/blog/2010/07/capistrano-executing-a-command-as-root-without-using-sudo/
#
def surun(command)
# To avoid the error 'standard in must be a tty'
default_run_options[:pty] = true
password = fetch(:root_password, Capistrano::CLI.password_prompt("root password: "))
run("su - -c '#{command}'") do |channel, stream, output|
channel.send_data("#{password}\n")
@hiroyuki-sato
hiroyuki-sato / gist:4507350
Created January 11, 2013 02:02
netatalk3.spec for RHEL, Scientific Linux and CentOS.
Name: netatalk
Version: 3.0.1
Release: 1%{?dist}
Summary: Netatalk is a freely-available Open Source AFP fileserver.
Group: System Environment/Daemons
License: GPL2
URL: http://netatalk.sourceforge.net/
Source0: http://download.sourceforge.net/netatalk/netatalk-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: cracklib-devel openssl-devel pam quota-devel libtool automake
@hiroyuki-sato
hiroyuki-sato / gist:4555704
Created January 17, 2013 12:45
My first gridinit-jmeter test file. It is for OpenAM Server. RESTApi ref : https://wikis.forgerock.org/confluence/display/openam/Use+OpenAM+RESTful+Services
require 'rubygems'
require 'gridinit-jmeter'
test do
threads 1, {loops: 10 }do
once do
submit 'Submit Form', 'http://openam.server:8080/openam/identity/authenticate', {
fill_in: {
@hiroyuki-sato
hiroyuki-sato / gist:4556012
Created January 17, 2013 13:49
gridinit-jmeter. Add Listener objects GraphVisualizer, TableVisualizer and SummaryReport sample.
require 'rubygems'
require 'gridinit-jmeter'
test do
threads 1, {loops: 10 }do
once do
submit 'Submit Form', 'http://openam.server:8080/openam/identity/authenticate', {
fill_in: {

ssoadm Batch Example

Command

# ${SSOADM} do-batch -u amadmin -f ${PWDFILE}  -Z ${BATCH_FILE} --batchstatus ${BATCH_OUTPUT_FILE} 

Realm was created.
require 'rubygems'
require 'gridinit-jmeter'
test do
threads 50, {ramp_time: 10, loops: 100 }do
once do
submit 'Submit Form', 'http://openam.server:8080/openam/identity/authenticate', {
fill_in: {
@hiroyuki-sato
hiroyuki-sato / gist:4950642
Created February 14, 2013 04:43
netatalk acl check
etc/afpd/acls.c
1285 /* In case we are acting on a directory prepare a default acl. For files default_acl will be NULL.
1286 * If the directory already has a default acl it will be preserved.
1287 */
1288 EC_ZERO_LOG_ERR(lstat(name, &st), AFPERR_NOOBJ);
1289
1290 if (S_ISDIR(st.st_mode)) {
1291 default_acl = acl_get_file(name, ACL_TYPE_DEFAULT);
1292
1293 if (default_acl) {
@hiroyuki-sato
hiroyuki-sato / gist:4960699
Created February 15, 2013 14:27
netatalk build failed when regenerate configure file.
%build
libtoolize --force
aclocal -I macros
automake --add-missing
autoconf
autoheader