Skip to content

Instantly share code, notes, and snippets.

View alexdean's full-sized avatar
🍩

Alex Dean alexdean

🍩
View GitHub Profile
@alexdean
alexdean / debian_7.txt
Created October 6, 2014 17:09
sysvmq segfaults
(irb):5: [BUG] Segmentation fault at 0x00000000000003
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0019 p:---- s:0076 e:000075 CFUNC :send
c:0018 p:0007 s:0072 e:000071 EVAL (irb):5 [FINISH]
c:0017 p:---- s:0070 e:000069 CFUNC :eval
c:0016 p:0024 s:0063 e:000062 METHOD /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/irb/workspace.rb:86
c:0015 p:0025 s:0056 e:000054 METHOD /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/irb/context.rb:380
c:0014 p:0022 s:0050 e:000049 BLOCK /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/irb.rb:492
@alexdean
alexdean / 01_code.py
Created February 5, 2015 01:09
BMP085 altitude calcs for various pressure readings
# poking at https://github.com/alexdean/Adafruit_Python_BMP/blob/master/Adafruit_BMP/BMP085.py#L191
pressures = [101325.00, 22632.10, 5474.89, 868.02, 110.91, 66.94, 3.96]
for pressure in pressures:
print(str(pressure) + "Pa == " + str(read_altitude(pressure)) + "m")
@alexdean
alexdean / 01_error.txt
Last active August 29, 2015 14:15
bundler dependency errors when upgrading to rails 4.2
$ bundle update rails
Fetching gem metadata from https://rubygems.org/.......
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
rails (= 4.2.0) ruby depends on
actionmailer (= 4.2.0) ruby depends on
actionpack (= 4.2.0) ruby depends on
activesupport (= 4.2.0) ruby
{
"auto_match_enabled": true,
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"draw_white_space": "selection",
"enable_tab_scrolling": false,
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[
".svn",
".git",
@alexdean
alexdean / keybase.md
Created April 2, 2015 12:16
keybase verification

Keybase proof

I hereby claim:

  • I am alexdean on github.
  • I am mostlyalex (https://keybase.io/mostlyalex) on keybase.
  • I have a public key whose fingerprint is FCB3 CEA4 5FEC 8F74 E4FF 75A7 CFE5 B806 CE15 B730

To claim this, I am signing this object:

require 'logger'
require 'aws-sdk'
log = Logger.new($stderr)
log.level = Logger::DEBUG
# fetch and print 1 record from the specified kinesis stream.
stream_name = ARGV[0]
starting_sequence_number = ARGV[1]
require 'logger'
require 'aws-sdk'
log = Logger.new($stderr)
log.level = Logger::DEBUG
stream_name = ARGV[0]
# http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-iam.html
These are some user stories I scraped together to help guide the rewrite of ganglia's web application.
Overview
========
Most of the time, I want to just quickly have a look at the overall status of our systems, and verify that everything is
running smoothly. I tend to browse around the app, not necessarily looking for anything specific. I just want to be able
to see that everything looks 'normal'. If we receive a problem report (usually something vague like 'the web site is slow'),
ganglia is often the first place I look for any sign of trouble.
Here, I find the most value in being able to visualize lots of data at once, and in being able to quickly navigate from
{
"view_name": "routers",
"items": [
{
"vertical_label": "Percent",
"title": "Routers CPU",
"metric_regex": [
{
"regex": "cpu_(system|user)"
}
// https://github.com/ganglia/ganglia-web/blob/master/templates/default/header.tpl#L129
function setStartAndEnd(startTime, endTime) {
// we're getting local start/end times.
console.log('start', new Date(startTime*1000), 'end', new Date(endTime*1000));
var local_offset = new Date().getTimezoneOffset() * 60;
console.log('local_offset', local_offset);
console.log('server_utc_offset', server_utc_offset);
var delta = -server_utc_offset - local_offset;