Skip to content

Instantly share code, notes, and snippets.

@pcorliss
pcorliss / sphinx.rb
Created May 22, 2013 15:29
brew recipie for sphinx 0.9.9. Install via: brew install --env=std --use-gcc --mysql https://gist.github.com/pcorliss/5628491/raw/eccb38d840734854dd5a10b25e7d52b71612f0d7/sphinx.rb
require 'formula'
class Libstemmer < Formula
# upstream is constantly changing the tarball,
# so doing checksum verification here would require
# constant, rapid updates to this formula.
head 'http://snowball.tartarus.org/dist/libstemmer_c.tgz'
homepage 'http://snowball.tartarus.org/'
end
@pcorliss
pcorliss / ask_a_question.md
Created July 16, 2013 04:47
Some tips on asking a question and getting results.

Asking a Question Checklist

Just Being Awesome

  • Be receptive
  • Have a good reputation
  • Don't waste time
  • Rubber duck

Do the Work

  • Repro Case
@pcorliss
pcorliss / typhoeus_stubbing.rb
Created December 6, 2013 21:55
Demonstration of non-default stub clearing between tests.
require 'rspec'
require 'typhoeus'
# This seems to fix the issue
#RSpec.configure do |config|
#config.before :each do
#Typhoeus::Config.block_connection = true
#Typhoeus::Expectation.clear
#end
#end
berkshelf_test $ berks install -d
==> Chef response did not contain a JSON body
Error retrieving versions of cookbook 'apt' at site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
berkshelf_test $ berks --version
Berkshelf (2.0.17)
Copyright 2012-2013 Riot Games
Jamie Winsor (<jamie@vialstudios.com>)
Josiah Kiehl (<jkiehl@riotgames.com>)
-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEA8lwF36CJIMfTQrbLW6909B3SFuN/LDFSGBqeDUrJv3F/NVy+jNjv
cu7mlBsN830sRxiwKha9DBzymHWOzKy11xFDO6S6jBmYbgfpTclRzXvKxghJ4rll
Rj9bzrvG/CQqYUHuId0EYvEM6FQ+vjgB87LnqW6MqNYMf8FW0jk6C2A8+37R+g/Y
8lMVJ8Ia0SUOFv0MZZLbWlXqo4EvLHIIWpuRxUu2XyWXd47NZ5jmSRQ5YnjW6OYV
QME3qpaPs2jbv5Ol/eCk4ccvmU4sxWmRiMJVy+1fR0V0PTJCAGXeGWFM7I3+6exM
4T3fJv4fDLbO5cdM4aOz1SOSjxR9osgjfQIDAQAB
-----END RSA PUBLIC KEY-----
Remote Address:204.109.13.115:443
Request URL:https://www.braintreepayments.com/create-merchant
Request Method:POST
Status Code:403 Forbidden
Request Headersview source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip,deflate
Accept-Language:en-US,en;q=0.8
Cache-Control:max-age=0
Connection:keep-alive

Keybase proof

I hereby claim:

  • I am pcorliss on github.
  • I am pcorliss (https://keybase.io/pcorliss) on keybase.
  • I have a public key whose fingerprint is 81BD B279 1750 0770 D24D 1D0E 748E E5F2 91E2 AC19

To claim this, I am signing this object:

@pcorliss
pcorliss / debian-jessie-not-working.log
Created March 24, 2015 19:50
A working and non-working example of ubuntu 12.04 versus debian jessie. Fix is to remove the data-dir and start from scratch
admin@ip-172-31-16-81:~$ sudo /usr/local/bin/consul agent -server -config-dir /etc/consul.d -data-dir /mnt/consul -bind=172.31.16.81 -bootstrap-expect=1
==> WARNING: BootstrapExpect Mode is specified as 1; this is the same as Bootstrap mode.
==> WARNING: Bootstrap mode enabled! Do not enable unless necessary
==> WARNING: It is highly recommended to set GOMAXPROCS higher than 1
==> Starting Consul agent...
==> Starting Consul agent RPC...
==> Consul agent running!
Node name: 'ip-172-31-16-81'
Datacenter: 'dc1'
Server: true (bootstrap: true)
ip-10-254-32-217:~/cosmos/aws_connectivity pcorliss@master M:3 % ruby lib/conn.rb
Connected to AWS
ec2: #<Fog::Compute::AWS::Real:0x00000002f0eec8>
SSHing to Servers |Time: 00:00:05 | ================================================================================================================== | Time: 00:00:05
ID | NAME                       | PRIV_IP      | STATE   | LISTENING
---|----------------------------|--------------|---------|----------
0  | Cassandra Non Seed Node 1  | 10.42.19.54  | running | false
1  | Cassandra Non Seed Node 2  | 10.42.22.70  | running | false
2  | Cassandra Non Seed Node 3  | 10.42.26.218 | running | false