I've been trying to understand how to setup systems from
the ground up on Ubuntu. I just installed redis
onto
the box and here's how I did it and some things to look
out for.
To install:
#!/bin/bash | |
for d in /sys/kernel/iommu_groups/*/devices/*; do | |
n=${d#*/iommu_groups/*}; n=${n%%/*} | |
printf 'IOMMU Group %s ' "$n" | |
lspci -nns "${d##*/}" | |
done |
ENV["RAILS_ENV"] = "test" | |
require File.expand_path('../../config/environment', __FILE__) | |
require 'rails/test_help' | |
require 'minitest/autorun' | |
require 'minitest/pride' | |
require 'capybara/rails' | |
class MiniTest::Spec | |
include ActiveSupport::Testing::SetupAndTeardown |
#!/bin/bash | |
# Tool declarations, modify as needed. | |
AWK="/usr/bin/awk" | |
CAT="/bin/cat" | |
COMM="/usr/bin/comm" | |
CUT="/usr/bin/cut" | |
DATE=`/bin/date +%Y/%m/%d` | |
DD="/bin/dd" | |
GREP="/bin/grep" |
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "Setting up your own private and secure VPN", | |
"Mappings": { | |
"AWSInstanceType2Arch": { | |
"High.Speed.VPN-Paid": { | |
"InstanceType": "t2.medium" | |
}, | |
"Standard.VPN-Free": { | |
"InstanceType": "t2.micro" |
#!/usr/bin/env ruby | |
# List all the (known) operations on each AWS service API. This is | |
# incredibly useful for building well-restricted IAM access | |
# rules. With this list you can quickly see what "s3:Get*" matches, or | |
# just glance through and look for something that might be missing and | |
# breaking your app. | |
# I can't believe I had to write this myself. I'm pretty sure there | |
# are a lot of people out there with near-god-mode permission on IAM |
var https = require('https'); | |
var util = require('util'); | |
exports.handler = function(event, context) { | |
console.log(JSON.stringify(event, null, 2)); | |
console.log('From SNS:', event.Records[0].Sns.Message); | |
var postData = { | |
"channel": "#aws-sns", | |
"username": "AWS SNS via Lamda :: DevQa Cloud", |
Out of the box, Homebrew does a default installation on Sphinx:
$ brew install sphinx
However, if you're using MySQL, the thinking-sphinx gem won't work because it needs to use MySQL libraries.
If you managed to screw up the first time, uninstall sphinx first:
$ brew remove sphinx
#!/bin/bash | |
cd <%= @options[:app_dir] %> | |
exec 2>&1 | |
exec <%= node[:runit][:chpst_bin] %> -e /etc/sv/<%= @options[:service_name] %>/env -u <%= @options[:app_user]%>:unicorn <%= @options[:bundler_binary] %> exec unicorn -E <%= @options[:environment] %> -c <%= @options[:config] %> |