I waited for years for a Homebrew formula for MOC. I finally found one today, but it didn't work for me. So I decided to try to compile it from source.
Here is a list of requirements, taken directly from the MOC README:
Problem: When linking to the raw version of a gist, the link changes with each revision.
Solution:
To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/
To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]
| <?php | |
| if (class_exists('Memcache')) { | |
| $server = 'localhost'; | |
| if (!empty($_REQUEST['server'])) { | |
| $server = $_REQUEST['server']; | |
| } | |
| $memcache = new Memcache; | |
| $isMemcacheAvailable = @$memcache->connect($server); | |
| if ($isMemcacheAvailable) { |
| multiline { | |
| tags => ["rails"] | |
| pattern => "^Started" | |
| negate => true | |
| what => "previous" | |
| } |
| ################################################################## | |
| # /etc/elasticsearch/elasticsearch.yml | |
| # | |
| # Base configuration for a write heavy cluster | |
| # | |
| # Cluster / Node Basics | |
| cluster.name: logng | |
| # Node can have abritrary attributes we can use for routing |
| 0. SSH to server | |
| 1. Edit /opt/bitnami/apps/jenkins/jenkins_home/config.xml | |
| 2. set userSecurity to false: <userSecurity>false</userSecurity> | |
| 3. delete | |
| <authorizationStrategy> and <securityRealm> | |
| 4. /etc/init.d/bitnami restart |
| # This is example contains the bare mininum to get nginx going with | |
| # Unicorn or Rainbows! servers. Generally these configuration settings | |
| # are applicable to other HTTP application servers (and not just Ruby | |
| # ones), so if you have one working well for proxying another app | |
| # server, feel free to continue using it. | |
| # | |
| # The only setting we feel strongly about is the fail_timeout=0 | |
| # directive in the "upstream" block. max_fails=0 also has the same | |
| # effect as fail_timeout=0 for current versions of nginx and may be | |
| # used in its place. |
| #!/usr/bin/env ruby | |
| BASEDIR = ENV["HOME"] + "/.git_redmine" | |
| require BASEDIR + "/git_redmine" | |
| include GitRedmine::Hooks | |
| exit commit_msg(ARGV[0]) | |
| #!/bin/sh | |
| # install into /etc/ppp/ip-down | |
| # chmod a+x /etc/ppp/ip-down | |
| source /etc/ppp/ip.config | |
| case "${IPREMOTE}" in | |
| ${MY_IPREMOTE}) | |
| /sbin/route delete ${MY_ROUTE} -interface ${IFNAME} |