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:
| #!/bin/bash | |
| PASS=`pwgen -s 40 1` | |
| mysql -uroot <<MYSQL_SCRIPT | |
| CREATE DATABASE $1; | |
| CREATE USER '$1'@'localhost' IDENTIFIED BY '$PASS'; | |
| GRANT ALL PRIVILEGES ON $1.* TO '$1'@'localhost'; | |
| FLUSH PRIVILEGES; | |
| MYSQL_SCRIPT |
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]) |