Skip to content

Instantly share code, notes, and snippets.

View FooBarWidget's full-sized avatar

Hongli Lai FooBarWidget

View GitHub Profile
# Generated by Chef
# Local modifications will be overwritten
$DirGroup syslog
$DirCreateMode 0755
$FileGroup syslog
$template PerHostAuth,"/srv/rsyslog/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/auth.log"
$template PerHostCron,"/srv/rsyslog/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/cron.log"
$template PerHostSyslog,"/srv/rsyslog/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/syslog"
Installing required packages: autoconf, automake, libtool, pkgconfig, apple-gcc42, libiconv, libyaml, libffi, readline, libxml2, libxslt, libksba, openssl, curl-ca-bundle, sqlite3, zlib, ncurses, gdbm.........................................................................................................................................................................................................................................................................................................................
Error running 'requirements_osx_port_libs_install autoconf automake libtool pkgconfig apple-gcc42 libiconv libyaml libffi readline libxml2 libxslt libksba openssl curl-ca-bundle sqlite3 zlib ncurses gdbm',
please read /Users/hongli/.rvm/log/ruby-2.0.0-p0/1367876993_package_install_autoconf_automake_libtool_pkgconfig_apple-gcc42_libiconv_libyaml_libffi_readline_libxml2_libxslt_libksba_openssl_curl-ca-bundle_sqlite3_zlib_ncurses_gdbm.log
$ gcc -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
$ rvm autolibs status
---
value: fail
number: 2
runner: osx
description: Allow RVM to use package manager if found, fail if dependencies are missing. This is default.
[2013-05-06 23:44:49] make
CC = gcc-4.2
LD = ld
LDSHARED = gcc-4.2 -dynamic -bundle
CFLAGS = -O2 -arch x86_64 -pipe
XCFLAGS = -include ruby/config.h -include ruby/missing.h -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE
CPPFLAGS = -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/Users/hongli/.rvm/usr/include -I/Users/hongli/.rvm/usr/include -I. -I.ext/include/x86_64-darwin12.3.0 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/Users/hongli/.rvm/usr/lib -L/Users/hongli/.rvm/usr/lib -fstack-protector -Wl,-u,_objc_msgSend -pie
SOLIBS =
compiling main.c
$ rvm reinstall ruby-2.0.0 --with-gcc=gcc-4.7
Removing /Users/hongli/.rvm/src/ruby-2.0.0-p0...
Removing /Users/hongli/.rvm/rubies/ruby-2.0.0-p0...
Fetching openssl-1.0.1c.tar.gz to /Users/hongli/.rvm/archives
Extracting openssl to /Users/hongli/.rvm/src/openssl-1.0.1c
Configuring openssl in /Users/hongli/.rvm/src/openssl-1.0.1c.
Error running './Configure darwin64-x86_64-cc -I/Users/hongli/.rvm/usr/include -L/Users/hongli/.rvm/usr/lib zlib no-asm no-krb5 --prefix=/Users/hongli/.rvm/usr --with-gcc=gcc-4.7 no-shared', please read /Users/hongli/.rvm/log/ruby-2.0.0-p0/openssl/configure.log
Compiling openssl in /Users/hongli/.rvm/src/openssl-1.0.1c.
Error running 'make', please read /Users/hongli/.rvm/log/ruby-2.0.0-p0/openssl/make.log
Updating openssl certificates
#!/bin/bash
set -e
if [[ "$1" = "" ]]; then
echo "Usage: showoff <LOCAL PORT>"
exit 1
else
echo "Showing off local port $1 at http://shell.phusion.nl:4000/ ..."
#ssh -tR 2839:localhost:$1 shell.phusion.nl "sudo ssh -l \$USER -L 83:127.0.0.1:2839 localhost 'echo Ready. && sleep 999d'"
exec ssh -nT -R :4000:localhost:$1 shell.phusion.nl 'echo Ready! Press Ctrl-C to stop. && sleep 999d'
fi
foo
===
== hello
This is some text.
Second **paragraph**.
text
files.sort! do |a, b|
version_aware_compare(a, b)
end
def version_aware_compare(a, b)
lhsegments = to_segments(a)
rhsegments = to_segments(b)
lhsize = lhsegments.size
rhsize = rhsegments.size
limit = (lhsize > rhsize ? lhsize : rhsize) - 1

When RVM is installed as single-user

Your RVM wrapper scripts are too old, or some wrapper scripts are missing. Please update/regenerate them first by running:

rvm get stable && rvm reload && rvm repair all

If that doesn't seem to work, please run:

rvm wrapper #{rvm_ruby_string} --no-prefix --all