Skip to content

Instantly share code, notes, and snippets.

View ryanschwartz's full-sized avatar

Ryan Schwartz ryanschwartz

View GitHub Profile
--- lib/god/cli/run.rb.orig 2008-12-18 21:20:23.000000000 +0000
+++ lib/god/cli/run.rb 2008-12-18 21:22:18.000000000 +0000
@@ -73,6 +73,11 @@
BleakHouseDiagnostic.install
end
+ # respect --no-syslog even if we're running in front, which is a requirement for launchd on Mac OS X
+ unless @options[:syslog]
+ Logger.syslog = false
+ end
#!/bin/bash -e
###########################################################
# Back up MySQL databases
###########################################################
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
BACKUP_DIR="."
# Do not backup these databases
Warning: You should upgrade to Xcode 3.1.4
==> Downloading http://collectd.org/files/collectd-4.9.1.tar.bz2
File already downloaded and cached to /Library/Caches/Homebrew
==> ./configure --prefix=/usr/local/Cellar/collectd/4.9.1 --disable-debug --disable-dependency-tracking
==> make install
Making install in libltdl
/bin/sh /private/tmp/homebrew-collectd-4.9.1-qb88/collectd-4.9.1/libltdl/config/install-sh -d .
cp ./argz_.h argz.h-t
mv argz.h-t argz.h
make install-am
sudo -s
find . -type f -exec chmod 0644 {} \; -print
find . -type d -exec chmod 0755 {} \; -print
exit
[carmen:/Volumes/vitalsource/bootstrap] admin$ cat passenger_gzip_boom.patch
--- Hooks.cpp 2009-10-21 22:45:03.000000000 +0000
+++ Hooks.cpp.patch 2009-10-26 19:17:19.000000000 +0000
@@ -480,7 +480,7 @@
const char *contentLength;
expectingUploadData = ap_should_client_block(r);
- contentLength = lookupHeader(r, "Content-Length");
+ contentLength = NULL;
@ryanschwartz
ryanschwartz / gist:981514
Created May 19, 2011 19:25
Patch Mac OS X's tomcat catalina.sh to remove the pidfile if the PID is not running
--- catalina.sh.dist 2011-05-19 19:22:30.000000000 +0000
+++ catalina.sh 2011-05-19 19:22:45.000000000 +0000
@@ -311,8 +311,14 @@
if [ ! -z "$CATALINA_PID" ]; then
if [ -f "$CATALINA_PID" ]; then
- echo "PID file ($CATALINA_PID) found. Is Tomcat still running? Start aborted."
- exit 1
+ RUNNING=`ps aux|grep \`cat $CATALINA_PID\`|grep [java]|wc -l`
+ if [ $RUNNING -eq 1 ]; then
@ryanschwartz
ryanschwartz / compiler_patch
Created April 25, 2012 16:19
Joyent SmartMachine SMF manifest for hand-built nginx with --prefix=/opt/local/nginx
--- lib/phusion_passenger/platform_info/compiler.rb.orig 2012-04-25 16:23:34.773244791 +0000
+++ lib/phusion_passenger/platform_info/compiler.rb 2012-04-25 16:21:21.044674989 +0000
@@ -142,8 +142,8 @@
end
if RUBY_PLATFORM =~ /solaris/
- flags << '-pthreads'
- flags << '-D_XOPEN_SOURCE=500 -D_XPG4_2 -D__EXTENSIONS__ -D__SOLARIS__ -D_FILE_OFFSET_BITS=64'
+ flags << '-pthreads -std=c99'
+ flags << '-D_XOPEN_SOURCE=500 -D_XPG6 -D__EXTENSIONS__ -D__SOLARIS__ -D_FILE_OFFSET_BITS=64'
@ryanschwartz
ryanschwartz / mount_usbkey_userfiles.sh
Created May 16, 2012 21:44
SMF script to allow global zone user/group modification
#!/usr/bin/bash
case "$1" in
'start')
if [[ -n $(/bin/bootparams | grep '^smartos=true') ]]; then
if [[ -z $(/usr/sbin/mount -p | grep 'passwd') ]]; then
if [[ /etc/passwd -ot /usbkey/passwd ]]; then
cp /usbkey/passwd /etc/passwd
else
cp /etc/passwd /usbkey/passwd
@ryanschwartz
ryanschwartz / -
Created May 23, 2013 02:21 — forked from anonymous/-
strano diff
diff --git a/Gemfile b/Gemfile
index 30c8aab..451aa31 100644
--- a/Gemfile
+++ b/Gemfile
@@ -12,6 +12,11 @@ group :assets do
gem 'uglifier', '>= 1.0.3'
end
+#uhhhhhhhhhhhhhhhhhhhhhhhhh...
+gem 'therubyracer', '=0.11.4'
@ryanschwartz
ryanschwartz / ruby 1.8.7 (system)
Last active August 29, 2015 14:02
PDFNetWrappers build attempt output
[lvdcvstmulappd01:/tmp/PDFNetWrappers/Build] root# ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
[lvdcvstmulappd01:/tmp/PDFNetWrappers/Build] root# cmake -D BUILD_PDFNetRuby:BOOL=ON ..
-- The CXX compiler identification is GNU 4.4.7
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found SWIG: /usr/bin/swig (found version "1.3.40")
-- Using SWIG 1.3.40