Skip to content

Instantly share code, notes, and snippets.

Remo Mueller remomueller

Block or report user

Report or block remomueller

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@remomueller
remomueller / gist:4250968
Created Dec 10, 2012
Bundler Error on attempting to Install a Prerelease Gem (Contour 1.1.2.pre)
View gist:4250968

Bundler Error installing Contour 1.1.2.pre

Summary

I'm the owner of the Contour gem, and pushed a new prerelease version 1.1.2.pre to RubyGems. I've done prerelease versions in the past, and have always been able to specify the version then in the Gemfile, for example: gem 'contour', '~> 1.1.2.pre'. Then followed by a bundle update, the gem would install correctly.

For some unknown reason, bundler is unable to find this gem, although it is available on RubyGems: rubygems.org/gems/contour/versions/1.1.2.pre

@remomueller
remomueller / ruby200-devkit-mysql.md
Last active Apr 5, 2018
Installation of Ruby 2.0.0-p0 on Windows 7 (64-bit) with DevKit and MySQL instructions
View ruby200-devkit-mysql.md

RubyInstaller RubyInstaller Downloads

Install Ruby

Run rubyinstaller-2.0.0.p0.exe

  • Add Ruby executables to your PATH
  • Associate .rb and .rbw files with this Ruby installation
@remomueller
remomueller / passenger-5.0.27-crash.txt
Last active Apr 11, 2016
Crash in Passenger 5.0.27 on Mac OS X 10.11.4
View passenger-5.0.27-crash.txt
App 6953 stdout:
[ pid=6940, timestamp=1460406610 ] Process aborted! signo=SIGSEGV(11), reason=#0, signal sent by PID 0 with UID 0, si_addr=0x0, randomSeed=1460406507
[ pid=6940 ] Crash log dumped to /var/tmp/passenger-crash-log.1460406610
[ pid=6940 ] Date, uname and ulimits:
Mon Apr 11 16:30:10 EDT 2016
Darwin 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64 i386
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
@remomueller
remomueller / check_edf_header.rb
Last active Dec 9, 2016
Check EDFs for unusual Physical Dimensions
View check_edf_header.rb
# gem install edfize --no-document
# ruby check_edf_header.rb
require 'rubygems'
require 'edfize'
signals_to_check = [
{ label: 'SAO2', physical_dimension: '%' },
{ label: 'Pulse', physical_dimension: ['bpm', 'bmp'] }
]
@remomueller
remomueller / check_signal_contains_dash.rb
Last active Dec 9, 2016
Check EDFs for signal labels that include a dash
View check_signal_contains_dash.rb
# gem install edfize --no-document
# ruby check_signal_contains_dash.rb
require 'rubygems'
require 'edfize'
VALID_LABELS = [
'C-Pres'
]
@remomueller
remomueller / rewrite_signal_date.rb
Last active Dec 8, 2016
A simple edfize ruby script that efficiently replaces zero dates "00.00.00" with a valid EDF start date "01.01.85"
View rewrite_signal_date.rb
# frozen_string_literal: true
# gem install edfize --no-document
# ruby rewrite_signal_date.rb
require 'rubygems'
require 'edfize'
WRONG_DATE = '00.00.00'
CLIPPING_DATE = '01.01.85'
@remomueller
remomueller / annotation_testing.rb
Last active Dec 9, 2016
Parse XML Annotation Files and retrieve time asleep and number of obstructive apnea events.
View annotation_testing.rb
# frozen_string_literal: true
# gem install xml-simple colorize --no-document
# ruby annotation_testing.rb
require 'rubygems'
require 'colorize'
require 'json'
require 'xmlsimple'
@remomueller
remomueller / loading_annotations.rb
Last active Dec 14, 2016
Simple script for loading and retrieving information from annotation files.
View loading_annotations.rb
# frozen_string_literal: true
# gem install xml-simple --no-document
# ruby loading_annotations.rb
require 'rubygems'
require 'csv'
require 'xmlsimple'
@remomueller
remomueller / ruby_2_4_0_integer_fixes.rb
Last active Feb 20, 2017
Cleans up some deprecation notices that can clutter up tests on Ruby 2.4.0, can be placed in `config/initializers`.
View ruby_2_4_0_integer_fixes.rb
# Fixes gems that reference Fixnum explicitly. Replaces `Fixnum` with `0.class`.
# mail-2.6.4/lib/mail/attachments_list.rb:33
module Mail
class AttachmentsList < Array
def [](index_value)
if index_value.is_a?(0.class)
self.fetch(index_value)
else
self.select { |a| a.filename == index_value }.first
@remomueller
remomueller / tutorial_01.rb
Last active Jan 30, 2017
Download EDFs programmatically
View tutorial_01.rb
# tutorial_01.rb
# sleepdata.org
# author: @remomueller
#
# Required Gems:
#
# gem install colorize edfize nsrr --no-document
#
# To Run Script:
#
You can’t perform that action at this time.