Skip to content

Instantly share code, notes, and snippets.

View jacques's full-sized avatar
🎯
Focusing

Jacques Marneweck jacques

🎯
Focusing
View GitHub Profile
@jacques
jacques / use-ruby-187-with-rails
Last active December 11, 2015 22:49
Moving over to TextDrive v2 and need to use Ruby 1.8.7 with your ancient Ruby on Rails site? This script is run from your RAILS_ROOT/script directory and fixes the scripts to use the ruby18 binary and gets your pkg_alternatives files in place to use ruby 1.8.7 when using irb / ruby at the command line.
#!/opt/local/bin/bash
#
# Fixes ancient ruby on rails sites to use the ruby18 binary so they use 1.8.7.
#
pkg_alternatives manual ruby18-base
gsed -i'.bak' -e '/env ruby/s/\/usr\/bin\/env ruby/\/opt\/local\/bin\/ruby18/g' about breakpointer console destroy generate plugin runner server process/reaper process/spawner
# This document describes updating the SmartOS boot_archive and /usr volumes.
#
# The boot_archive effectively contains /. If you want to make changes to SMF
# or so forth, you need to update the boot_archive.
#
# If you want to add things to /usr, such as drivers, you will need to update
# usr.lgz. It is compressed, so note the lofiadm -U and -C calls below. Once
# you have updated usr.lgz you will need to copy it back to the mounted
# boot_arhive.
#
== Rules ==
On Infrastructure
-----------------
There is one system, not a collection of systems.
The desired state of the system should be a known quantity.
The "known quantity" must be machine parseable.
The actual state of the system must self-correct to the desired state.
The only authoritative source for the actual state of the system is the system.
The entire system must be deployable using source media and text files.
@jacques
jacques / diffs.txt
Created January 30, 2014 17:41
Work on getting lang/spidermonkey to 1.8.5
diff --git a/lang/spidermonkey/Makefile b/lang/spidermonkey/Makefile
index 1f1315b..b9db45c 100644
--- a/lang/spidermonkey/Makefile
+++ b/lang/spidermonkey/Makefile
@@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.27 2013/07/15 02:02:24 ryoon Exp $
-DISTNAME= js-1.8.0-rc1
-PKGNAME= spidermonkey-1.8.0rc1
-PKGREVISION= 4
@jacques
jacques / fix-php-fcgi
Created May 7, 2014 07:02
Script which fixes users php fcgi wrapper scripts to use the correct php binary after webmin pulls the location to binary config out of who knows where (might be related to restored accounts but the binary path was the same previously).
#!/opt/local/bin/bash
#
# Script which fixes users php fcgi wrapper scripts to use the correct php binary.
#
# Copyright (c) 2014 Jacques Marneweck. All rights rserved.
# Copyright (c) 2014 Kaizen Garden. All rights reserved.
#
set -o errexit
set -o pipefail
@jacques
jacques / README.md
Last active August 29, 2015 14:06 — forked from mariocesar/README.md

Install

Create a websites user.

sudo adduser --disabled-password --home /src/websites websites

Login and install dropbox.

sudo -s su - websites

@jacques
jacques / README.md
Last active August 29, 2015 14:09
Known Issues with SDC7

Known Issues with SDC7

Provisioning the UFSD zone fails causing smartdc/init to go into maintenance

Root cause is that Postgres is in read only mode (sdc-login manatee) to edit one of the node-manatee files to force not being in readonly mode. Quite a bit of hand holding required to get moray's db in place and set perms and create one table.

sdc-manatee-stat is missing (causes sdc-backup to fail)

Copy sdc-manatee-stat from Ryan Nelson to /opt/smartdc/bin/

# Author: Aram Grigorian <[email protected]>
# https://github.com/aramg
# https://github.com/opendns
#
# By default, nginx will close upstream connections after every request.
# The upstream-keepalive module tries to remedy this by keeping a certain minimum number of
# persistent connections open at all times to upstreams. These connections are re-used for
# all requests, regardless of downstream connection source. There are options available
# for load balacing clients to the same upstreams more consistently.
# This is all designed around the reverse proxy case, which is nginxs main purpose.
@jacques
jacques / s3.vcl
Created February 19, 2016 22:38 — forked from rezan/s3.vcl
Varnish AWS S3 Gateway VCL
#
# Varnish AWS S3 Gateway VCL
#
# Allows global read (GET, HEAD) and ACL protected writes (POST, PUT, DELETE).
# When writing, pass in Content-Type and Content-MD5, both are optional.
#
# Params:
#
# %BUCKET% - S3 bucket name, S3 host may be regional
# %ACCESS_ID% - IAM access ID for bucket
@jacques
jacques / give to java devs.md
Created February 26, 2016 09:20
Plutus API Integration Notes for Developers