Skip to content

Instantly share code, notes, and snippets.

View smerrill's full-sized avatar
🤖
Attention is all you need

Steven Merrill smerrill

🤖
Attention is all you need
View GitHub Profile
@smerrill
smerrill / gist:10544237
Last active August 4, 2023 12:26
Socket Activation Notes
Socket activation:
NGINX=3:4
ListenStream=10646 (IPv6)
ListenStream=0.0.0.0:10646 (IPv4)
BindIPv6Only=ipv6-only
nginx.conf:
server {
[centos@varnish4 ~]$ sudo yum install varnish-4.0.0
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirror.lug.udel.edu
* epel: epel.mirror.constant.com
* extras: mirror.atlanticmetro.net
* updates: mirrors.einstein.yu.edu
varnish-4.0 | 951 B 00:00
Setting up Install Process
Resolving Dependencies
@smerrill
smerrill / -
Created February 4, 2014 13:49
a
@smerrill
smerrill / map.geojson
Created October 27, 2013 01:59
Phase2 Office Locations
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@smerrill
smerrill / create-openshift-user.sh
Created September 22, 2013 15:45
Script to create an OpenShift user on an OpenShift broker.
$ cd /var/www/openshift/broker
$ rails console
irb(main):> a = OpenShift::MongoAuthService.new()
=> #<OpenShift::MongoAuthService:0x00000004507db0 @salt="changeme">
irb(main):> a.register_user('steven','merrill')
=> true
@smerrill
smerrill / openshift-lein.sh
Created August 30, 2013 17:22
Download and run leiningen (for Clojure) in an OpenShift DIY cartridge.
HTTP_CLIENT="curl --insecure -f -L -o" LEIN_HOME=$OPENSHIFT_DATA_DIR/.lein LEIN_JVM_OPTS="-Duser.home=$OPENSHIFT_DATA_DIR" lein
$ cat ~/bin/rhc-oo
#!/bin/bash
rhc $@ -ladmin -padmin --server <your origin server's FQDN> -k
#!/bin/bash
LASTSECTOR=`fdisk -l | grep /dev/vda1 | awk '{ print $4 }'`
/bin/echo "d
2
n
p
2
$LASTSECTOR
@smerrill
smerrill / openshift-origin-instructions.md
Last active December 18, 2015 13:39
Instructions on how you can get your own OpenShift Origin machine running on RHEL/CentOS 6 to closely match OpenShift Origin for cartridge development.

This document describes installing an OpenShift Origin server on RHEL/CentOS 6.4.

It uses named (because the Avahi support does not work on RHEL 6 yet) and assumes a domain name of "broker.openshiftorigin" and a domain of "openshiftorigin"

First, kickstart a machine using the kickstart below.

Next, log into the machine as root:openshift and do the following to get it provisioned:

  • cd /etc/puppet
  • Create the site.pp file, grabbing the DNSSEC key
@smerrill
smerrill / php.conf
Created June 13, 2013 23:13
Make mod_fastcgi and php-fpm work on OpenShift.
LoadModule fastcgi_module /var/lib/openshift/51b9f2285004465ff6000011/app-root/runtime/mod_fastcgi/usr/lib64/httpd/modules/mod_fastcgi.so
<IfModule mod_fastcgi.c>
Alias /php5.fcgi /var/www/php5.fcgi
FastCGIExternalServer /var/www/php5.fcgi -flush -socket /tmp/php-fpm.sock
AddType application/x-httpd-fastphp5 .php
Action application/x-httpd-fastphp5 /php5.fcgi
</IfModule>
#LoadModule php5_module modules/libphp5.so
<FilesMatch \.php$>
SetHandler application/x-httpd-fastphp5